Skip to content

Commit f4f63a7

Browse files
yousefmoazzamandybalaam
authored andcommitted
test: create plain text room event with EventFactory
1 parent 26afd89 commit f4f63a7

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

crates/matrix-sdk-ui/tests/integration/notification_client.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::{
66
use assert_matches::assert_matches;
77
use matrix_sdk::{config::SyncSettings, test_utils::logged_in_client_with_server};
88
use matrix_sdk_test::{
9-
async_test, mocks::mock_encryption_state, sync_timeline_event, JoinedRoomBuilder,
9+
async_test, event_factory::EventFactory, mocks::mock_encryption_state, JoinedRoomBuilder,
1010
StateTestEvent, SyncResponseBuilder,
1111
};
1212
use matrix_sdk_ui::{
@@ -51,7 +51,14 @@ async fn test_notification_client_with_context() {
5151

5252
let mut sync_builder = SyncResponseBuilder::new();
5353
sync_builder.add_joined_room(
54-
JoinedRoomBuilder::new(room_id).add_timeline_event(sync_timeline_event!(event_json)),
54+
JoinedRoomBuilder::new(room_id).add_timeline_event(
55+
EventFactory::new()
56+
.text_msg("Hello world!")
57+
.event_id(event_id)
58+
.server_ts(152049794)
59+
.sender(sender)
60+
.into_raw_sync(),
61+
),
5562
);
5663

5764
// First, mock a sync that contains a text message.

0 commit comments

Comments
 (0)