mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-12 15:34:00 +00:00
Prevent random test failure (#4184)
This commit is contained in:
parent
49377c195e
commit
7ba1d98915
2 changed files with 11 additions and 2 deletions
|
@ -23,6 +23,7 @@ full = [
|
||||||
"tracing",
|
"tracing",
|
||||||
"ts-rs",
|
"ts-rs",
|
||||||
"actix-web",
|
"actix-web",
|
||||||
|
"lemmy_db_schema/full",
|
||||||
]
|
]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
|
@ -811,9 +811,17 @@ mod tests {
|
||||||
CommunityModerator::join(pool, &form).await.unwrap();
|
CommunityModerator::join(pool, &form).await.unwrap();
|
||||||
|
|
||||||
// Make sure that they come back as a mod in the list
|
// 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;
|
cleanup(data, pool).await;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue