From f71a0a2e22865b38b53ad8790a61680749841fc0 Mon Sep 17 00:00:00 2001 From: aringenbach Date: Wed, 28 Jun 2023 14:47:07 +0200 Subject: [PATCH] Fix `by_sender` test --- crates/matrix-sdk-ui/src/timeline/tests/reaction_group.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/matrix-sdk-ui/src/timeline/tests/reaction_group.rs b/crates/matrix-sdk-ui/src/timeline/tests/reaction_group.rs index 83777f3a1ca..08b9c1ae66d 100644 --- a/crates/matrix-sdk-ui/src/timeline/tests/reaction_group.rs +++ b/crates/matrix-sdk-ui/src/timeline/tests/reaction_group.rs @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +use assert_matches::assert_matches; use ruma::{server_name, user_id, EventId, MilliSecondsSinceUnixEpoch, OwnedUserId, UserId}; use crate::timeline::{ @@ -35,7 +36,11 @@ fn by_sender() { let alice_reactions = reaction_group.by_sender(&alice).collect::>(); let reaction = *alice_reactions.get(0).unwrap(); - assert_eq!(reaction.1.unwrap(), reaction_1.event_id().unwrap()); + + assert_matches!( + reaction_1, + EventItemIdentifier::EventId(event_id) => { assert_eq!(reaction.1.unwrap(), &event_id) } + ) } #[test]