Skip to content

Commit

Permalink
test(llc): update sendImage, sendFile tests
Browse files Browse the repository at this point in the history
Signed-off-by: xsahil03x <xdsahil@gmail.com>
  • Loading branch information
xsahil03x committed May 6, 2022
1 parent 893d28c commit 2e8f630
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/stream_chat/test/src/client/channel_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ void main() {
channelType,
onSendProgress: any(named: 'onSendProgress'),
cancelToken: any(named: 'cancelToken'),
extraData: any(named: 'extraData'),
)).thenAnswer((_) async => sendImageResponse);

when(() => client.sendFile(
Expand All @@ -321,6 +322,7 @@ void main() {
channelType,
onSendProgress: any(named: 'onSendProgress'),
cancelToken: any(named: 'cancelToken'),
extraData: any(named: 'extraData'),
)).thenAnswer((_) async => sendFileResponse);

when(() => client.sendMessage(
Expand Down Expand Up @@ -440,6 +442,7 @@ void main() {
channelType,
onSendProgress: any(named: 'onSendProgress'),
cancelToken: any(named: 'cancelToken'),
extraData: any(named: 'extraData'),
)).called(2);

verify(() => client.sendFile(
Expand All @@ -448,6 +451,7 @@ void main() {
channelType,
onSendProgress: any(named: 'onSendProgress'),
cancelToken: any(named: 'cancelToken'),
extraData: any(named: 'extraData'),
)).called(1);

verify(() => client.sendMessage(
Expand Down Expand Up @@ -524,6 +528,7 @@ void main() {
channelType,
onSendProgress: any(named: 'onSendProgress'),
cancelToken: any(named: 'cancelToken'),
extraData: any(named: 'extraData'),
)).thenAnswer((_) async => sendImageResponse);

when(() => client.sendFile(
Expand All @@ -532,6 +537,7 @@ void main() {
channelType,
onSendProgress: any(named: 'onSendProgress'),
cancelToken: any(named: 'cancelToken'),
extraData: any(named: 'extraData'),
)).thenAnswer((_) async => sendFileResponse);

when(() => client.updateMessage(
Expand Down Expand Up @@ -649,6 +655,7 @@ void main() {
channelType,
onSendProgress: any(named: 'onSendProgress'),
cancelToken: any(named: 'cancelToken'),
extraData: any(named: 'extraData'),
)).called(2);

verify(() => client.sendFile(
Expand All @@ -657,6 +664,7 @@ void main() {
channelType,
onSendProgress: any(named: 'onSendProgress'),
cancelToken: any(named: 'cancelToken'),
extraData: any(named: 'extraData'),
)).called(1);

verify(() => client.updateMessage(
Expand Down

0 comments on commit 2e8f630

Please sign in to comment.