events: Fix test

… wasn't failing CI because `#[test]` attribute was missing.
This commit is contained in:
Jonas Platte 2021-10-29 22:13:44 +02:00
parent 3ea16b6d09
commit 0c1e1df8ad
No known key found for this signature in database
GPG Key ID: 7D261D771D915378

View File

@ -245,7 +245,7 @@ mod tests {
#[cfg(feature = "unstable-pre-spec")]
use super::AllowRule;
use super::{JoinRule, RoomJoinRulesEvent, RoomJoinRulesEventContent};
use super::{JoinRule, RoomJoinRulesEventContent, SyncRoomJoinRulesEvent};
#[test]
fn deserialize() {
@ -283,6 +283,7 @@ mod tests {
}
}
#[test]
fn deserialize_restricted_event() {
let json = r#"{
"type": "m.room.join_rules",
@ -301,6 +302,6 @@ mod tests {
"event_id": "$0ACb9KSPlT3al3kikyRYvFhMqXPP9ZcQOBrsdIuh58U"
}"#;
assert_matches!(serde_json::from_str::<RoomJoinRulesEvent>(json), Ok(_));
assert_matches!(serde_json::from_str::<SyncRoomJoinRulesEvent>(json), Ok(_));
}
}