diff --git a/forum-network/src/index.html b/forum-network/src/index.html
index 473347e..0da31e7 100644
--- a/forum-network/src/index.html
+++ b/forum-network/src/index.html
@@ -19,7 +19,8 @@
Negative citation of a weaker negative citation
Redistribute power
Redistribute power through subsequent support
- Destroy a post after it has received positive citations
+ Destroy a post after it has received positive citations
+ Reversal of power redistribution
diff --git a/forum-network/src/tests/all.test.html b/forum-network/src/tests/all.test.html
index 82baba7..94d0c51 100644
--- a/forum-network/src/tests/all.test.html
+++ b/forum-network/src/tests/all.test.html
@@ -29,6 +29,7 @@
+
+
+
+
+
+
diff --git a/forum-network/src/tests/scripts/forum/forum6.test.js b/forum-network/src/tests/scripts/forum/forum6.test.js
new file mode 100644
index 0000000..25fd228
--- /dev/null
+++ b/forum-network/src/tests/scripts/forum/forum6.test.js
@@ -0,0 +1,88 @@
+import { ForumTest } from './forum.test-util.js';
+
+describe('Forum', () => {
+ const forumTest = new ForumTest();
+
+ before(async () => {
+ await forumTest.setup();
+ });
+
+ context('Reversal of power redistribution', async () => {
+ let forum;
+ let experts;
+ let posts;
+
+ before(() => {
+ forum = forumTest.forum;
+ experts = forumTest.experts;
+ posts = forumTest.posts;
+ });
+
+ it('Post1', async () => {
+ await forumTest.addPost(experts[0], 10);
+ forum.getPost(posts[0]).value.should.equal(10);
+ });
+
+ it('Post2', async () => {
+ await forumTest.addPost(experts[0], 10);
+ forum.getPost(posts[0]).value.should.equal(10);
+ forum.getPost(posts[1]).value.should.equal(10);
+ });
+
+ it('Post3 cites Post2 and negatively cites Post1', async () => {
+ await forumTest.addPost(experts[0], 0, [
+ { postId: posts[0], weight: -1 },
+ { postId: posts[1], weight: 1 },
+ ]);
+ forum.getPost(posts[0]).value.should.equal(10);
+ forum.getPost(posts[1]).value.should.equal(10);
+ forum.getPost(posts[2]).value.should.equal(0);
+ });
+
+ it('Post4 cites Post3 to strengthen its effect', async () => {
+ await forumTest.addPost(experts[0], 10, [
+ { postId: posts[2], weight: 1 },
+ ]);
+ forum.getPost(posts[0]).value.should.equal(0);
+ forum.getPost(posts[1]).value.should.equal(30);
+ forum.getPost(posts[2]).value.should.equal(0);
+ forum.getPost(posts[3]).value.should.equal(0);
+ });
+
+ it('Post5 cites Post3 to strengthen its effect', async () => {
+ await forumTest.addPost(experts[0], 10, [
+ { postId: posts[2], weight: 1 },
+ ]);
+ forum.getPost(posts[0]).value.should.equal(0);
+ forum.getPost(posts[1]).value.should.equal(40);
+ forum.getPost(posts[2]).value.should.equal(0);
+ forum.getPost(posts[3]).value.should.equal(0);
+ forum.getPost(posts[4]).value.should.equal(0);
+ });
+
+ it('Post6 cites Post3 negatively', async () => {
+ await forumTest.addPost(experts[0], 10, [
+ { postId: posts[2], weight: -1 },
+ ]);
+ forum.getPost(posts[0]).value.should.equal(10);
+ forum.getPost(posts[1]).value.should.equal(20);
+ forum.getPost(posts[2]).value.should.equal(0);
+ forum.getPost(posts[3]).value.should.equal(0);
+ forum.getPost(posts[4]).value.should.equal(0);
+ forum.getPost(posts[5]).value.should.equal(20);
+ });
+
+ it('Post7 cites Post3 negatively', async () => {
+ await forumTest.addPost(experts[0], 10, [
+ { postId: posts[2], weight: -1 },
+ ]);
+ forum.getPost(posts[0]).value.should.equal(10);
+ forum.getPost(posts[1]).value.should.equal(10);
+ forum.getPost(posts[2]).value.should.equal(0);
+ forum.getPost(posts[3]).value.should.equal(0);
+ forum.getPost(posts[4]).value.should.equal(0);
+ forum.getPost(posts[5]).value.should.equal(20);
+ forum.getPost(posts[6]).value.should.equal(20);
+ });
+ });
+});