File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
packages/stream_chat/test/src/client Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -1154,6 +1154,26 @@ void main() {
11541154 cancelToken: any (named: 'cancelToken' ))).called (1 );
11551155 });
11561156
1157+ test ('`.stopAIResponse`' , () async {
1158+ final stopAIEvent = Event (type: EventType .aiIndicatorStop);
1159+
1160+ when (() => client.sendEvent (
1161+ channelId,
1162+ channelType,
1163+ any (that: isSameEventAs (stopAIEvent)),
1164+ )).thenAnswer ((_) async => EmptyResponse ());
1165+
1166+ final res = await channel.stopAIResponse ();
1167+
1168+ expect (res, isNotNull);
1169+
1170+ verify (() => client.sendEvent (
1171+ channelId,
1172+ channelType,
1173+ any (that: isSameEventAs (stopAIEvent)),
1174+ )).called (1 );
1175+ });
1176+
11571177 test ('`.sendEvent`' , () async {
11581178 final event = Event (type: 'event.local' );
11591179
You can’t perform that action at this time.
0 commit comments