fix delete test
This commit is contained in:
parent
a59a94492d
commit
a61d564732
1 changed files with 6 additions and 2 deletions
|
@ -261,13 +261,17 @@ test("Delete a post", async () => {
|
||||||
|
|
||||||
// Make sure lemmy beta sees post is deleted
|
// Make sure lemmy beta sees post is deleted
|
||||||
// This will be undefined because of the tombstone
|
// This will be undefined because of the tombstone
|
||||||
await waitForPost(beta, postRes.post_view.post, p => !p);
|
await waitForPost(beta, postRes.post_view.post, p => !p || p.post.deleted);
|
||||||
|
|
||||||
// Undelete
|
// Undelete
|
||||||
let undeletedPost = await deletePost(alpha, false, postRes.post_view.post);
|
let undeletedPost = await deletePost(alpha, false, postRes.post_view.post);
|
||||||
|
|
||||||
// Make sure lemmy beta sees post is undeleted
|
// Make sure lemmy beta sees post is undeleted
|
||||||
let betaPost2 = await waitForPost(beta, postRes.post_view.post);
|
let betaPost2 = await waitForPost(
|
||||||
|
beta,
|
||||||
|
postRes.post_view.post,
|
||||||
|
p => !!p && !p.post.deleted,
|
||||||
|
);
|
||||||
|
|
||||||
if (!betaPost2) {
|
if (!betaPost2) {
|
||||||
throw "Missing beta post 2";
|
throw "Missing beta post 2";
|
||||||
|
|
Loading…
Reference in a new issue