@@ -1107,6 +1107,13 @@ mod tests {
11071107 let room = client. get_room ( room_id) . expect ( "No room found" ) ;
11081108 assert_eq ! ( room. cached_display_name( ) . unwrap( ) . to_string( ) , "Hello World" ) ;
11091109
1110+ assert_matches ! (
1111+ room_info_notable_update. recv( ) . await ,
1112+ Ok ( RoomInfoNotableUpdate { room_id: received_room_id, reasons } ) => {
1113+ assert_eq!( received_room_id, room_id) ;
1114+ assert!( reasons. contains( RoomInfoNotableUpdateReasons :: NONE ) ) ;
1115+ }
1116+ ) ;
11101117 assert_matches ! (
11111118 room_info_notable_update. recv( ) . await ,
11121119 Ok ( RoomInfoNotableUpdate { room_id: received_room_id, reasons } ) => {
@@ -1813,6 +1820,13 @@ mod tests {
18131820 assert!( !received_reasons. contains( RoomInfoNotableUpdateReasons :: RECENCY_STAMP ) ) ;
18141821 }
18151822 ) ;
1823+ assert_matches ! (
1824+ room_info_notable_update_stream. recv( ) . await ,
1825+ Ok ( RoomInfoNotableUpdate { room_id: received_room_id, reasons: received_reasons } ) => {
1826+ assert_eq!( received_room_id, room_id) ;
1827+ assert!( received_reasons. contains( RoomInfoNotableUpdateReasons :: DISPLAY_NAME ) ) ;
1828+ }
1829+ ) ;
18161830 assert ! ( room_info_notable_update_stream. is_empty( ) ) ;
18171831
18181832 // When I send sliding sync response containing a room with a recency stamp.
@@ -1860,6 +1874,13 @@ mod tests {
18601874 assert!( !received_reasons. contains( RoomInfoNotableUpdateReasons :: READ_RECEIPT ) ) ;
18611875 }
18621876 ) ;
1877+ assert_matches ! (
1878+ room_info_notable_update_stream. recv( ) . await ,
1879+ Ok ( RoomInfoNotableUpdate { room_id: received_room_id, reasons: received_reasons } ) => {
1880+ assert_eq!( received_room_id, room_id) ;
1881+ assert!( received_reasons. contains( RoomInfoNotableUpdateReasons :: DISPLAY_NAME ) ) ;
1882+ }
1883+ ) ;
18631884 assert ! ( room_info_notable_update_stream. is_empty( ) ) ;
18641885
18651886 // When I send sliding sync response containing a couple of events with no read
@@ -1906,6 +1927,13 @@ mod tests {
19061927 . expect ( "Failed to process sync" ) ;
19071928
19081929 // Other notable update reason. We don't really care about them here.
1930+ assert_matches ! (
1931+ room_info_notable_update_stream. recv( ) . await ,
1932+ Ok ( RoomInfoNotableUpdate { room_id: received_room_id, reasons: received_reasons } ) => {
1933+ assert_eq!( received_room_id, room_id) ;
1934+ assert!( received_reasons. contains( RoomInfoNotableUpdateReasons :: NONE ) ) ;
1935+ }
1936+ ) ;
19091937 assert_matches ! (
19101938 room_info_notable_update_stream. recv( ) . await ,
19111939 Ok ( RoomInfoNotableUpdate { room_id: received_room_id, reasons: received_reasons } ) => {
@@ -1938,6 +1966,13 @@ mod tests {
19381966 . expect ( "Failed to process sync" ) ;
19391967
19401968 // Room was already joined, no `MEMBERSHIP` update should be triggered here
1969+ assert_matches ! (
1970+ room_info_notable_update_stream. recv( ) . await ,
1971+ Ok ( RoomInfoNotableUpdate { room_id: received_room_id, reasons: received_reasons } ) => {
1972+ assert_eq!( received_room_id, room_id) ;
1973+ assert!( received_reasons. contains( RoomInfoNotableUpdateReasons :: NONE ) ) ;
1974+ }
1975+ ) ;
19411976 assert ! ( room_info_notable_update_stream. is_empty( ) ) ;
19421977
19431978 let events = vec ! [ Raw :: from_json_string(
@@ -1987,7 +2022,14 @@ mod tests {
19872022 . await
19882023 . expect ( "Failed to process sync" ) ;
19892024
1990- // Another notable update is received, but not the one we are interested by.
2025+ // Other notable updates are received, but not the ones we are interested by.
2026+ assert_matches ! (
2027+ room_info_notable_update_stream. recv( ) . await ,
2028+ Ok ( RoomInfoNotableUpdate { room_id: received_room_id, reasons: received_reasons } ) => {
2029+ assert_eq!( received_room_id, room_id) ;
2030+ assert!( received_reasons. contains( RoomInfoNotableUpdateReasons :: NONE ) , "{received_reasons:?}" ) ;
2031+ }
2032+ ) ;
19912033 assert_matches ! (
19922034 room_info_notable_update_stream. recv( ) . await ,
19932035 Ok ( RoomInfoNotableUpdate { room_id: received_room_id, reasons: received_reasons } ) => {
@@ -2034,6 +2076,13 @@ mod tests {
20342076 . await
20352077 . expect ( "Failed to process sync" ) ;
20362078
2079+ assert_matches ! (
2080+ room_info_notable_update_stream. recv( ) . await ,
2081+ Ok ( RoomInfoNotableUpdate { room_id: received_room_id, reasons: received_reasons } ) => {
2082+ assert_eq!( received_room_id, room_id) ;
2083+ assert!( received_reasons. contains( RoomInfoNotableUpdateReasons :: NONE ) , "{received_reasons:?}" ) ;
2084+ }
2085+ ) ;
20372086 assert ! ( room_info_notable_update_stream. is_empty( ) ) ;
20382087
20392088 // …Unless its value changes!
0 commit comments