Skip to content

Commit 450036c

Browse files
committed
matrix-sdk-test: Add response for members API
1 parent a4bac49 commit 450036c

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
use lazy_static::lazy_static;
2+
use serde_json::{json, Value as JsonValue};
3+
4+
lazy_static! {
5+
pub static ref MEMBERS: JsonValue = json!({
6+
"chunk": [
7+
{
8+
"content": {
9+
"avatar_url": null,
10+
"displayname": "example",
11+
"membership": "join"
12+
},
13+
"event_id": "$151800140517rfvjc:localhost",
14+
"membership": "join",
15+
"origin_server_ts": 151800140,
16+
"sender": "@example:localhost",
17+
"state_key": "@example:localhost",
18+
"type": "m.room.member",
19+
"unsigned": {
20+
"age": 2970366,
21+
}
22+
}
23+
]
24+
});
25+
}

matrix_sdk_test/src/test_json/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use lazy_static::lazy_static;
88
use serde_json::{json, Value as JsonValue};
99

1010
pub mod events;
11+
pub mod members;
1112
pub mod sync;
1213

1314
pub use events::{
@@ -20,6 +21,8 @@ pub use sync::{
2021
DEFAULT_SYNC_SUMMARY, INVITE_SYNC, LEAVE_SYNC, LEAVE_SYNC_EVENT, MORE_SYNC, SYNC, VOIP_SYNC,
2122
};
2223

24+
pub use members::MEMBERS;
25+
2326
lazy_static! {
2427
pub static ref DEVICES: JsonValue = json!({
2528
"devices": [

0 commit comments

Comments
 (0)