From 9444f1506d289e782cdd27d7b5deb442dff8c7b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Thu, 16 Apr 2020 13:32:04 +0200 Subject: [PATCH] crypto: Test the loading of specific group sessions in the sqlite store. --- src/crypto/store/sqlite.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/crypto/store/sqlite.rs b/src/crypto/store/sqlite.rs index c1b5436f..e53af529 100644 --- a/src/crypto/store/sqlite.rs +++ b/src/crypto/store/sqlite.rs @@ -683,12 +683,19 @@ mod test { let session_id = session.session_id().to_owned(); store - .save_inbound_group_session(session) + .save_inbound_group_session(session.clone()) .await .expect("Can't save group session"); let sessions = store.load_inbound_group_sessions().await.unwrap(); assert_eq!(session_id, sessions[0].session_id()); + + let loaded_session = store + .get_inbound_group_session(&session.room_id, &session.sender_key, session.session_id()) + .await + .unwrap() + .unwrap(); + assert_eq!(session, loaded_session); } }