File tree Expand file tree Collapse file tree 1 file changed +10
-12
lines changed
crates/matrix-sdk-ui/src/timeline/tests Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change 11use assert_matches:: assert_matches;
22use eyeball_im:: VectorDiff ;
3- use matrix_sdk_base:: deserialized_responses:: { ShieldState , ShieldStateCode , TimelineEvent } ;
4- use matrix_sdk_test:: { async_test, sync_timeline_event, ALICE } ;
3+ use matrix_sdk_base:: deserialized_responses:: { ShieldState , ShieldStateCode } ;
4+ use matrix_sdk_test:: { async_test, event_factory :: EventFactory , sync_timeline_event, ALICE } ;
55use ruma:: {
66 event_id,
77 events:: {
@@ -100,16 +100,14 @@ async fn test_local_sent_in_clear_shield() {
100100
101101 // When the remote echo comes in.
102102 timeline
103- . handle_live_event ( TimelineEvent :: new ( sync_timeline_event ! ( {
104- "content" : {
105- "body" : "Local message" ,
106- "msgtype" : "m.text" ,
107- } ,
108- "sender" : & * ALICE ,
109- "event_id" : event_id,
110- "origin_server_ts" : timestamp,
111- "type" : "m.room.message" ,
112- } ) ) )
103+ . handle_live_event (
104+ EventFactory :: new ( )
105+ . text_msg ( "Local message" )
106+ . sender ( * ALICE )
107+ . event_id ( event_id)
108+ . server_ts ( timestamp)
109+ . into_event ( ) ,
110+ )
113111 . await ;
114112 assert_next_matches ! ( stream, VectorDiff :: Remove { index: 1 } ) ;
115113 let item = assert_next_matches ! ( stream, VectorDiff :: PushFront { value } => value) ;
You can’t perform that action at this time.
0 commit comments