Skip to content

Commit 54bc774

Browse files
committed
test(sdk): Clarify a test with json! instead of a string.
1 parent e2af4cc commit 54bc774

File tree

1 file changed

+21
-2
lines changed
  • crates/matrix-sdk/src/sliding_sync

1 file changed

+21
-2
lines changed

crates/matrix-sdk/src/sliding_sync/room.rs

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -758,8 +758,27 @@ mod tests {
758758
};
759759

760760
assert_eq!(
761-
serde_json::to_string(&frozen_sliding_sync_room).unwrap(),
762-
r#"{"room_id":"!29fhd83h92h0:example.com","inner":{},"timeline":[{"event":{"content":{"body":"let it gooo!","msgtype":"m.text"},"event_id":"$xxxxx:example.org","origin_server_ts":2189,"room_id":"!someroom:example.com","sender":"@bob:example.com","type":"m.room.message"},"encryption_info":null}]}"#,
761+
serde_json::to_value(&frozen_sliding_sync_room).unwrap(),
762+
json!({
763+
"room_id": "!29fhd83h92h0:example.com",
764+
"inner": {},
765+
"timeline": [
766+
{
767+
"event": {
768+
"content": {
769+
"body": "let it gooo!",
770+
"msgtype": "m.text"
771+
},
772+
"event_id": "$xxxxx:example.org",
773+
"origin_server_ts": 2189,
774+
"room_id": "!someroom:example.com",
775+
"sender": "@bob:example.com",
776+
"type": "m.room.message"
777+
},
778+
"encryption_info": null
779+
}
780+
]
781+
})
763782
);
764783
}
765784
}

0 commit comments

Comments
 (0)