tests: get rid of GlobalAccountDataTestEvent::Direct

This commit is contained in:
Benjamin Bouvier
2025-08-21 12:02:57 +02:00
parent 1866143456
commit faee647c3a
4 changed files with 1 additions and 20 deletions

View File

@@ -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,

View File

@@ -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()

View File

@@ -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,

View File

@@ -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": {