mirror of
https://github.com/LemmyNet/lemmy
synced 2024-11-10 06:54:12 +00:00
fix tests
This commit is contained in:
parent
8862d61d40
commit
811e0f2df0
1 changed files with 8 additions and 12 deletions
|
@ -950,9 +950,8 @@ mod tests {
|
|||
show_bot_accounts: Some(false),
|
||||
..Default::default()
|
||||
};
|
||||
let inserted_local_user =
|
||||
LocalUser::update(pool, data.local_user_view.local_user.id, &local_user_form).await?;
|
||||
data.local_user_view.local_user = inserted_local_user;
|
||||
LocalUser::update(pool, data.local_user_view.local_user.id, &local_user_form).await?;
|
||||
data.local_user_view.local_user.show_bot_accounts = false;
|
||||
|
||||
let read_post_listing = PostQuery {
|
||||
community_id: Some(data.inserted_community.id),
|
||||
|
@ -986,9 +985,8 @@ mod tests {
|
|||
show_bot_accounts: Some(true),
|
||||
..Default::default()
|
||||
};
|
||||
let inserted_local_user =
|
||||
LocalUser::update(pool, data.local_user_view.local_user.id, &local_user_form).await?;
|
||||
data.local_user_view.local_user = inserted_local_user;
|
||||
LocalUser::update(pool, data.local_user_view.local_user.id, &local_user_form).await?;
|
||||
data.local_user_view.local_user.show_bot_accounts = true;
|
||||
|
||||
let post_listings_with_bots = PostQuery {
|
||||
community_id: Some(data.inserted_community.id),
|
||||
|
@ -1110,9 +1108,8 @@ mod tests {
|
|||
show_bot_accounts: Some(false),
|
||||
..Default::default()
|
||||
};
|
||||
let inserted_local_user =
|
||||
LocalUser::update(pool, data.local_user_view.local_user.id, &local_user_form).await?;
|
||||
data.local_user_view.local_user = inserted_local_user;
|
||||
LocalUser::update(pool, data.local_user_view.local_user.id, &local_user_form).await?;
|
||||
data.local_user_view.local_user.show_bot_accounts = false;
|
||||
|
||||
let read_post_listing = PostQuery {
|
||||
community_id: Some(data.inserted_community.id),
|
||||
|
@ -1533,9 +1530,8 @@ mod tests {
|
|||
show_read_posts: Some(false),
|
||||
..Default::default()
|
||||
};
|
||||
let inserted_local_user =
|
||||
LocalUser::update(pool, data.local_user_view.local_user.id, &local_user_form).await?;
|
||||
data.local_user_view.local_user = inserted_local_user;
|
||||
LocalUser::update(pool, data.local_user_view.local_user.id, &local_user_form).await?;
|
||||
data.local_user_view.local_user.show_read_posts = false;
|
||||
|
||||
// Mark a post as read
|
||||
PostRead::mark_as_read(
|
||||
|
|
Loading…
Reference in a new issue