mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-22 19:01:32 +00:00
Remove saved_only test.
This commit is contained in:
parent
cfd302dc1d
commit
9a0e050ee6
1 changed files with 1 additions and 29 deletions
|
@ -674,7 +674,7 @@ mod tests {
|
|||
site::Site,
|
||||
tag::{PostTagInsertForm, Tag, TagInsertForm},
|
||||
},
|
||||
traits::{Bannable, Blockable, Crud, Followable, Joinable, Likeable, Saveable},
|
||||
traits::{Bannable, Blockable, Crud, Followable, Joinable, Likeable},
|
||||
utils::{build_db_pool, get_conn, uplete, ActualDbPool, DbPool, RANK_DEFAULT},
|
||||
CommunityVisibility,
|
||||
PostSortType,
|
||||
|
@ -1206,34 +1206,6 @@ mod tests {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
#[test_context(Data)]
|
||||
#[tokio::test]
|
||||
#[serial]
|
||||
async fn post_listing_saved_only(data: &mut Data) -> LemmyResult<()> {
|
||||
let pool = &data.pool();
|
||||
let pool = &mut pool.into();
|
||||
|
||||
// Save only the bot post
|
||||
// The saved_only should only show the bot post
|
||||
let post_save_form =
|
||||
PostSavedForm::new(data.inserted_bot_post.id, data.local_user_view.person.id);
|
||||
PostSaved::save(pool, &post_save_form).await?;
|
||||
|
||||
// Read the saved only
|
||||
let read_saved_post_listing = PostQuery {
|
||||
community_id: Some(data.inserted_community.id),
|
||||
saved_only: Some(true),
|
||||
..data.default_post_query()
|
||||
}
|
||||
.list(&data.site, pool)
|
||||
.await?;
|
||||
|
||||
// This should only include the bot post, not the one you created
|
||||
assert_eq!(vec![POST_BY_BOT], names(&read_saved_post_listing));
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test_context(Data)]
|
||||
#[tokio::test]
|
||||
#[serial]
|
||||
|
|
Loading…
Reference in a new issue