diff --git a/test/model/message_list_test.dart b/test/model/message_list_test.dart index 9215e497e2..63426ddd6b 100644 --- a/test/model/message_list_test.dart +++ b/test/model/message_list_test.dart @@ -1703,6 +1703,23 @@ void main() { } } }); + test('stream messages match with case-insensitive topics', () { + final stream = eg.stream(); + final messageLower = eg.streamMessage( + stream: stream, + topic: 'hello world'); + final messageUpper = eg.streamMessage( + stream: stream, + topic: 'Hello World'); + final messageDiff = eg.streamMessage( + stream: stream, + topic: 'different'); + + check(haveSameRecipient(messageLower, messageUpper)).isTrue(); + check(haveSameRecipient(messageUpper, messageLower)).isTrue(); + check(haveSameRecipient(messageLower, messageDiff)).isFalse(); + check(haveSameRecipient(messageUpper, messageDiff)).isFalse(); + }); }); test('messagesSameDay', () {