From 450036cf86fbe5c3740e67f2de400e1933c06442 Mon Sep 17 00:00:00 2001 From: Julian Sparber Date: Fri, 12 Mar 2021 14:11:46 +0100 Subject: [PATCH] matrix-sdk-test: Add response for members API --- matrix_sdk_test/src/test_json/members.rs | 25 ++++++++++++++++++++++++ matrix_sdk_test/src/test_json/mod.rs | 3 +++ 2 files changed, 28 insertions(+) create mode 100644 matrix_sdk_test/src/test_json/members.rs diff --git a/matrix_sdk_test/src/test_json/members.rs b/matrix_sdk_test/src/test_json/members.rs new file mode 100644 index 00000000..401ec034 --- /dev/null +++ b/matrix_sdk_test/src/test_json/members.rs @@ -0,0 +1,25 @@ +use lazy_static::lazy_static; +use serde_json::{json, Value as JsonValue}; + +lazy_static! { + pub static ref MEMBERS: JsonValue = json!({ + "chunk": [ + { + "content": { + "avatar_url": null, + "displayname": "example", + "membership": "join" + }, + "event_id": "$151800140517rfvjc:localhost", + "membership": "join", + "origin_server_ts": 151800140, + "sender": "@example:localhost", + "state_key": "@example:localhost", + "type": "m.room.member", + "unsigned": { + "age": 2970366, + } + } + ] + }); +} diff --git a/matrix_sdk_test/src/test_json/mod.rs b/matrix_sdk_test/src/test_json/mod.rs index b03d55b7..9aa96482 100644 --- a/matrix_sdk_test/src/test_json/mod.rs +++ b/matrix_sdk_test/src/test_json/mod.rs @@ -8,6 +8,7 @@ use lazy_static::lazy_static; use serde_json::{json, Value as JsonValue}; pub mod events; +pub mod members; pub mod sync; pub use events::{ @@ -20,6 +21,8 @@ pub use sync::{ DEFAULT_SYNC_SUMMARY, INVITE_SYNC, LEAVE_SYNC, LEAVE_SYNC_EVENT, MORE_SYNC, SYNC, VOIP_SYNC, }; +pub use members::MEMBERS; + lazy_static! { pub static ref DEVICES: JsonValue = json!({ "devices": [