fix(llc): channel.stopWatching

Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
Sahil Kumar
2021-07-21 15:22:36 +05:30
committed by xsahil03x
parent c4a173f522
commit efab551fdb
2 changed files with 3 additions and 2 deletions
@@ -289,6 +289,7 @@ class ChannelApi {
) async {
final response = await _client.post(
'${_getChannelUrl(channelId, channelType)}/stop-watching',
data: {},
);
return EmptyResponse.fromJson(response.data);
}
@@ -595,14 +595,14 @@ void main() {
final path = '${_getChannelUrl(channelId, channelType)}/stop-watching';
when(() => client.post(path)).thenAnswer(
when(() => client.post(path, data: {})).thenAnswer(
(_) async => successResponse(path, data: <String, dynamic>{}));
final res = await channelApi.stopWatching(channelId, channelType);
expect(res, isNotNull);
verify(() => client.post(path)).called(1);
verify(() => client.post(path, data: {})).called(1);
verifyNoMoreInteractions(client);
});
}