+ let read_liked_post_listing = PostQuery {
+ community_id: (Some(data.inserted_community.id)),
+ local_user: (Some(&data.local_user_view)),
+ liked_only: (Some(true)),
+ ..Default::default()
+ }
+ .list(pool)
+ .await
+ .unwrap();
+ assert_eq!(read_post_listing, read_liked_post_listing);
+
+ let read_disliked_post_listing = PostQuery {
+ community_id: (Some(data.inserted_community.id)),
+ local_user: (Some(&data.local_user_view)),
+ disliked_only: (Some(true)),
+ ..Default::default()
+ }
+ .list(pool)
+ .await
+ .unwrap();
+ assert!(read_disliked_post_listing.is_empty());
+