From de98a3a12e55a23f796574dfdc30a40750ca1794 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Wed, 28 Feb 2024 12:25:51 -0500 Subject: [PATCH] Fixing test. --- crates/db_views/src/post_view.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/db_views/src/post_view.rs b/crates/db_views/src/post_view.rs index d885fc997..82a86fac7 100644 --- a/crates/db_views/src/post_view.rs +++ b/crates/db_views/src/post_view.rs @@ -1521,7 +1521,12 @@ mod tests { assert_eq!(vec![POST_BY_BOT, POST], names(&post_listings_show_hidden)); // Make sure that hidden field is true. - assert!(&post_listings_show_hidden[0].hidden); + assert!( + &post_listings_show_hidden + .first() + .expect("first post should exist") + .hidden + ); cleanup(data, pool).await }