From a6af31984adc613bbb26e489d4b45531d06ebfb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Mon, 4 Dec 2023 13:12:32 +0100 Subject: [PATCH] Assert that the stream is pending MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kévin Commaille --- crates/matrix-sdk/src/notification_settings/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/matrix-sdk/src/notification_settings/mod.rs b/crates/matrix-sdk/src/notification_settings/mod.rs index 326cb3f16..d885b23ed 100644 --- a/crates/matrix-sdk/src/notification_settings/mod.rs +++ b/crates/matrix-sdk/src/notification_settings/mod.rs @@ -449,7 +449,7 @@ mod tests { OwnedRoomId, RoomId, }; use serde_json::json; - use stream_assert::assert_next_eq; + use stream_assert::{assert_next_eq, assert_pending}; use tokio_stream::wrappers::BroadcastStream; use wiremock::{ matchers::{header, method, path, path_regex}, @@ -507,9 +507,12 @@ mod tests { let subscriber = settings.subscribe_to_changes(); let mut stream = BroadcastStream::new(subscriber); + assert_pending!(stream); + client.sync_once(SyncSettings::default()).await.unwrap(); assert_next_eq!(stream, Ok(())); + assert_pending!(stream); } #[async_test]