mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-26 11:21:02 +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),
|
show_bot_accounts: Some(false),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
let inserted_local_user =
|
LocalUser::update(pool, data.local_user_view.local_user.id, &local_user_form).await?;
|
||||||
LocalUser::update(pool, data.local_user_view.local_user.id, &local_user_form).await?;
|
data.local_user_view.local_user.show_bot_accounts = false;
|
||||||
data.local_user_view.local_user = inserted_local_user;
|
|
||||||
|
|
||||||
let read_post_listing = PostQuery {
|
let read_post_listing = PostQuery {
|
||||||
community_id: Some(data.inserted_community.id),
|
community_id: Some(data.inserted_community.id),
|
||||||
|
@ -986,9 +985,8 @@ mod tests {
|
||||||
show_bot_accounts: Some(true),
|
show_bot_accounts: Some(true),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
let inserted_local_user =
|
LocalUser::update(pool, data.local_user_view.local_user.id, &local_user_form).await?;
|
||||||
LocalUser::update(pool, data.local_user_view.local_user.id, &local_user_form).await?;
|
data.local_user_view.local_user.show_bot_accounts = true;
|
||||||
data.local_user_view.local_user = inserted_local_user;
|
|
||||||
|
|
||||||
let post_listings_with_bots = PostQuery {
|
let post_listings_with_bots = PostQuery {
|
||||||
community_id: Some(data.inserted_community.id),
|
community_id: Some(data.inserted_community.id),
|
||||||
|
@ -1110,9 +1108,8 @@ mod tests {
|
||||||
show_bot_accounts: Some(false),
|
show_bot_accounts: Some(false),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
let inserted_local_user =
|
LocalUser::update(pool, data.local_user_view.local_user.id, &local_user_form).await?;
|
||||||
LocalUser::update(pool, data.local_user_view.local_user.id, &local_user_form).await?;
|
data.local_user_view.local_user.show_bot_accounts = false;
|
||||||
data.local_user_view.local_user = inserted_local_user;
|
|
||||||
|
|
||||||
let read_post_listing = PostQuery {
|
let read_post_listing = PostQuery {
|
||||||
community_id: Some(data.inserted_community.id),
|
community_id: Some(data.inserted_community.id),
|
||||||
|
@ -1533,9 +1530,8 @@ mod tests {
|
||||||
show_read_posts: Some(false),
|
show_read_posts: Some(false),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
let inserted_local_user =
|
LocalUser::update(pool, data.local_user_view.local_user.id, &local_user_form).await?;
|
||||||
LocalUser::update(pool, data.local_user_view.local_user.id, &local_user_form).await?;
|
data.local_user_view.local_user.show_read_posts = false;
|
||||||
data.local_user_view.local_user = inserted_local_user;
|
|
||||||
|
|
||||||
// Mark a post as read
|
// Mark a post as read
|
||||||
PostRead::mark_as_read(
|
PostRead::mark_as_read(
|
||||||
|
|
Loading…
Reference in a new issue