Skip to content

Commit b344ade

Browse files
committed
test: update tests
1 parent a2fc774 commit b344ade

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

packages/stream_chat/test/fixtures/event.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,7 @@
2525
"online": false,
2626
"image": "https://getstream.io/random_svg/?name=Dry+meadow",
2727
"name": "Dry meadow"
28-
}
28+
},
29+
"ai_state": "AI_STATE_THINKING",
30+
"ai_message": "Some message"
2931
}

packages/stream_chat/test/src/core/models/event_test.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ void main() {
1414
expect(event.me, isA<OwnUser>());
1515
expect(event.user, isA<User>());
1616
expect(event.isLocal, false);
17+
expect(event.aiState, AITypingState.thinking);
18+
expect(event.aiMessage, 'Some message');
1719
});
1820

1921
test('should serialize to json correctly', () {
@@ -27,6 +29,9 @@ void main() {
2729
totalUnreadCount: 1,
2830
unreadChannels: 1,
2931
online: true,
32+
aiState: AITypingState.thinking,
33+
aiMessage: 'Some message',
34+
messageId: 'messageId',
3035
);
3136

3237
expect(
@@ -49,6 +54,9 @@ void main() {
4954
'channel_type': null,
5055
'parent_id': null,
5156
'is_local': true,
57+
'ai_state': 'AI_STATE_THINKING',
58+
'ai_message': 'Some message',
59+
'message_id': 'messageId',
5260
},
5361
);
5462
});

0 commit comments

Comments
 (0)