Prevent random test failure (#4184)

pull/4181/head
Nutomic 7 months ago committed by GitHub
parent 49377c195e
commit 7ba1d98915
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -23,6 +23,7 @@ full = [
"tracing",
"ts-rs",
"actix-web",
"lemmy_db_schema/full",
]
[dependencies]

@ -811,9 +811,17 @@ mod tests {
CommunityModerator::join(pool, &form).await.unwrap();
// Make sure that they come back as a mod in the list
let comments = CommentQuery::default().list(pool).await.unwrap();
let comments = CommentQuery {
sort: Some(CommentSortType::New),
..Default::default()
}
.list(pool)
.await
.unwrap();
assert!(comments[1].creator_is_moderator);
assert!(!comments[0].creator_is_moderator);
assert!(!comments[1].creator_is_moderator);
assert!(comments[4].creator_is_moderator);
cleanup(data, pool).await;
}

Loading…
Cancel
Save