mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-07 15:33:45 -04:00
tests: get rid of GlobalAccountDataTestEvent::Direct
This commit is contained in:
@@ -151,7 +151,6 @@ impl SyncResponseBuilder {
|
||||
event: GlobalAccountDataTestEvent,
|
||||
) -> &mut Self {
|
||||
let val = match event {
|
||||
GlobalAccountDataTestEvent::Direct => test_json::DIRECT.to_owned(),
|
||||
GlobalAccountDataTestEvent::PushRules => test_json::PUSH_RULES.to_owned(),
|
||||
GlobalAccountDataTestEvent::IgnoredUserList => test_json::IGNORED_USER_LIST.to_owned(),
|
||||
GlobalAccountDataTestEvent::Custom(json) => json,
|
||||
|
||||
@@ -149,7 +149,6 @@ impl From<PresenceTestEvent> for Raw<PresenceEvent> {
|
||||
|
||||
/// Test events that can be added to the global account data.
|
||||
pub enum GlobalAccountDataTestEvent {
|
||||
Direct,
|
||||
PushRules,
|
||||
IgnoredUserList,
|
||||
Custom(JsonValue),
|
||||
@@ -158,7 +157,6 @@ pub enum GlobalAccountDataTestEvent {
|
||||
impl From<GlobalAccountDataTestEvent> for JsonValue {
|
||||
fn from(val: GlobalAccountDataTestEvent) -> Self {
|
||||
match val {
|
||||
GlobalAccountDataTestEvent::Direct => test_json::sync_events::DIRECT.to_owned(),
|
||||
GlobalAccountDataTestEvent::PushRules => test_json::sync_events::PUSH_RULES.to_owned(),
|
||||
GlobalAccountDataTestEvent::IgnoredUserList => {
|
||||
test_json::sync_events::IGNORED_USER_LIST.to_owned()
|
||||
|
||||
@@ -29,7 +29,7 @@ pub use sync::{
|
||||
VOIP_SYNC,
|
||||
};
|
||||
pub use sync_events::{
|
||||
ALIAS, ALIASES, DIRECT, ENCRYPTION, IGNORED_USER_LIST, MEMBER, MEMBER_ADDITIONAL, MEMBER_BAN,
|
||||
ALIAS, ALIASES, ENCRYPTION, IGNORED_USER_LIST, MEMBER, MEMBER_ADDITIONAL, MEMBER_BAN,
|
||||
MEMBER_INVITE, MEMBER_LEAVE, MEMBER_NAME_CHANGE, MEMBER_STRIPPED, NAME, NAME_STRIPPED,
|
||||
POWER_LEVELS, PRESENCE, PUSH_RULES, REDACTED_INVALID, REDACTED_STATE, TAG, TOPIC,
|
||||
TOPIC_REDACTION,
|
||||
|
||||
@@ -57,22 +57,6 @@ pub static CREATE: Lazy<JsonValue> = Lazy::new(|| {
|
||||
})
|
||||
});
|
||||
|
||||
pub static DIRECT: Lazy<JsonValue> = Lazy::new(|| {
|
||||
json!({
|
||||
"content": {
|
||||
"@invited:localhost": [*DEFAULT_TEST_ROOM_ID],
|
||||
},
|
||||
"event_id": "$757957878228ekrDs:localhost",
|
||||
"origin_server_ts": 17195787,
|
||||
"sender": "@example:localhost",
|
||||
"state_key": "",
|
||||
"type": "m.direct",
|
||||
"unsigned": {
|
||||
"age": 139298
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
pub static FULLY_READ: Lazy<JsonValue> = Lazy::new(|| {
|
||||
json!({
|
||||
"content": {
|
||||
|
||||
Reference in New Issue
Block a user