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 1
1
use assert_matches:: assert_matches;
2
2
use 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 } ;
5
5
use ruma:: {
6
6
event_id,
7
7
events:: {
@@ -100,16 +100,14 @@ async fn test_local_sent_in_clear_shield() {
100
100
101
101
// When the remote echo comes in.
102
102
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
+ )
113
111
. await ;
114
112
assert_next_matches ! ( stream, VectorDiff :: Remove { index: 1 } ) ;
115
113
let item = assert_next_matches ! ( stream, VectorDiff :: PushFront { value } => value) ;
You can’t perform that action at this time.
0 commit comments