Skip to content

Commit

Permalink
fixup: try with_settings sort_map
Browse files Browse the repository at this point in the history
  • Loading branch information
BillCarsonFr committed Dec 18, 2024
1 parent cd73928 commit 08cc49e
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions crates/matrix-sdk-common/src/deserialized_responses.rs
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ mod tests {
use std::{collections::BTreeMap, vec};

use assert_matches::assert_matches;
use insta::assert_json_snapshot;
use insta::{assert_json_snapshot, with_settings};
use ruma::{
device_id, event_id,
events::{room::message::RoomMessageEventContent, AnySyncTimelineEvent},
Expand Down Expand Up @@ -1349,9 +1349,11 @@ mod tests {
sender_claimed_keys: map,
};

assert_json_snapshot! {
serde_json::to_value(&info).unwrap(),
}
with_settings!({sort_maps =>true}, {
assert_json_snapshot! {
serde_json::to_value(&info).unwrap(),
}
})
}

#[test]
Expand All @@ -1366,8 +1368,10 @@ mod tests {
verification_state: VerificationState::Verified,
};

assert_json_snapshot! {
serde_json::to_value(&info).unwrap(),
}
with_settings!({sort_maps =>true}, {
assert_json_snapshot! {
serde_json::to_value(&info).unwrap(),
}
});
}
}

0 comments on commit 08cc49e

Please sign in to comment.