diff --git a/crates/wysiwyg/src/tests/test_mentions.rs b/crates/wysiwyg/src/tests/test_mentions.rs index e2dd1384a..57c9d6012 100644 --- a/crates/wysiwyg/src/tests/test_mentions.rs +++ b/crates/wysiwyg/src/tests/test_mentions.rs @@ -627,6 +627,16 @@ fn get_mentions_state_for_at_room_mention() { assert_eq!(model.get_mentions_state(), state) } +#[test] +fn get_mentions_state_for_at_room_plain_mention() { + let model = cm("

hello @room|"); + let state = MentionsState { + user_ids: Default::default(), + has_at_room_mention: true, + }; + assert_eq!(model.get_mentions_state(), state) +} + #[test] fn get_mentions_state_for_multiple_user_and_at_room_mentions() { let model = cm("

hello Alice, Bob and @room!|

"); @@ -645,6 +655,12 @@ fn get_mentions_state_for_user_mention_with_custom_link() { assert_eq!(model.get_mentions_state(), state) } +#[test] +fn get_mentions_state_empty_for_non_intentional_room_mention() { + let model = cm("
hello @room!|
"); + assert_eq!(model.get_mentions_state(), MentionsState::default()) +} + /** * HELPER FUNCTIONS */