events: Fix tests for unstable-pre-spec

This commit is contained in:
Jonas Platte 2021-02-12 13:41:54 +01:00
parent cd2c540e92
commit 317b2055a8
No known key found for this signature in database
GPG Key ID: CC154DE0E30B7C67

View File

@ -158,7 +158,7 @@ fn edit_deserialization_061() {
#[test] #[test]
#[cfg(feature = "unstable-pre-spec")] #[cfg(feature = "unstable-pre-spec")]
fn edit_deserialization_future() { fn edit_deserialization_future() {
use crate::room::relationships::Replacement; use ruma_events::room::relationships::Replacement;
let ev_id = event_id!("$1598361704261elfgc:localhost"); let ev_id = event_id!("$1598361704261elfgc:localhost");
let json_data = json!({ let json_data = json!({
@ -181,6 +181,7 @@ fn edit_deserialization_future() {
formatted: None, formatted: None,
relates_to: Some(Relation::Replacement(Replacement { event_id })), relates_to: Some(Relation::Replacement(Replacement { event_id })),
new_content: Some(new_content), new_content: Some(new_content),
..
}) if body == "s/foo/bar" }) if body == "s/foo/bar"
&& event_id == ev_id && event_id == ev_id
&& matches!( && matches!(
@ -190,6 +191,7 @@ fn edit_deserialization_future() {
formatted: None, formatted: None,
relates_to: None, relates_to: None,
new_content: None, new_content: None,
..
}) if body == "bar" }) if body == "bar"
) )
); );
@ -219,7 +221,7 @@ fn verification_request_deserialization() {
body, body,
to, to,
from_device, from_device,
methods methods,
}) if body == "@example:localhost is requesting to verify your key, ..." }) if body == "@example:localhost is requesting to verify your key, ..."
&& to == user_id && to == user_id
&& from_device == device_id && from_device == device_id