Update simple power redistribution example
Making the receiving post start with zero value, for a simpler comparison with example 9
This commit is contained in:
parent
0a8b170115
commit
353190fdcd
|
@ -19,9 +19,9 @@ describe('Forum', function tests() {
|
||||||
|
|
||||||
it('Post2', async () => {
|
it('Post2', async () => {
|
||||||
const { forum, experts, posts } = forumTest;
|
const { forum, experts, posts } = forumTest;
|
||||||
await forumTest.addPost(experts[0], 10);
|
await forumTest.addPost(experts[0], 0);
|
||||||
forum.getPost(posts[0]).value.should.equal(10);
|
forum.getPost(posts[0]).value.should.equal(10);
|
||||||
forum.getPost(posts[1]).value.should.equal(10);
|
forum.getPost(posts[1]).value.should.equal(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Post3 cites Post2 and negatively cites Post1', async () => {
|
it('Post3 cites Post2 and negatively cites Post1', async () => {
|
||||||
|
@ -31,7 +31,7 @@ describe('Forum', function tests() {
|
||||||
{ postId: posts[1], weight: 1 },
|
{ postId: posts[1], weight: 1 },
|
||||||
]);
|
]);
|
||||||
forum.getPost(posts[0]).value.should.equal(0);
|
forum.getPost(posts[0]).value.should.equal(0);
|
||||||
forum.getPost(posts[1]).value.should.equal(30);
|
forum.getPost(posts[1]).value.should.equal(20);
|
||||||
forum.getPost(posts[2]).value.should.equal(0);
|
forum.getPost(posts[2]).value.should.equal(0);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue