Skip to content

Node.js based forum software built for the modern web

test: update test for toPid logic to reflect that toPid stays even if parent is purged

Julian Lam98a1101d40a5
diff --git a/test/topics.js b/test/topics.js
index 9f6b2c719b..fb3f9cb835 100644
--- a/test/topics.js
+++ b/test/topics.js
@@ -327,7 +327,7 @@ describe('Topic\'s', () => {
replies = await apiPosts.getReplies({ uid: fooUid }, { pid: reply1.pid });
assert.strictEqual(replies, null);
toPid = await posts.getPostField(reply2.pid, 'toPid');
- assert.strictEqual(toPid, null);
+ assert.strictEqual(parseInt(toPid, 10), parseInt(reply1.pid, 10));
});
});