File tree 1 file changed +13
-9
lines changed 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import '../api/model/model_checks.dart';
14
14
import '../api/model/submessage_checks.dart' ;
15
15
import '../example_data.dart' as eg;
16
16
import '../stdlib_checks.dart' ;
17
+ import '../test_log.dart' ;
17
18
import 'message_list_test.dart' ;
18
19
import 'store_checks.dart' ;
19
20
import 'test_store.dart' ;
@@ -664,15 +665,18 @@ void main() {
664
665
665
666
test ('ignore submessage event with malformed content' , () async {
666
667
final messageId = await preparePollMessage ();
667
- await store.handleEvent (
668
- eg.submessageEvent (
669
- streamMessage.id,
670
- eg.selfUser.userId,
671
- content: jsonEncode ({
672
- 'type' : 'question' ,
673
- // Invalid type for question
674
- 'question' : 123 ,
675
- })));
668
+ await checkLogs (() async {
669
+ await store.handleEvent (
670
+ eg.submessageEvent (
671
+ streamMessage.id,
672
+ eg.selfUser.userId,
673
+ content: jsonEncode ({
674
+ 'type' : 'question' ,
675
+ // Invalid type for question
676
+ 'question' : 123 ,
677
+ })));
678
+ })..length.equals (2 )
679
+ ..last.contains ('Malformed submessage event data for poll' );
676
680
checkNotNotified ();
677
681
check (store.messages[messageId]).isNotNull ().poll.isNotNull ();
678
682
});
You can’t perform that action at this time.
0 commit comments