fix(llc): channel.stopWatching
Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
@@ -289,6 +289,7 @@ class ChannelApi {
|
|||||||
) async {
|
) async {
|
||||||
final response = await _client.post(
|
final response = await _client.post(
|
||||||
'${_getChannelUrl(channelId, channelType)}/stop-watching',
|
'${_getChannelUrl(channelId, channelType)}/stop-watching',
|
||||||
|
data: {},
|
||||||
);
|
);
|
||||||
return EmptyResponse.fromJson(response.data);
|
return EmptyResponse.fromJson(response.data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -595,14 +595,14 @@ void main() {
|
|||||||
|
|
||||||
final path = '${_getChannelUrl(channelId, channelType)}/stop-watching';
|
final path = '${_getChannelUrl(channelId, channelType)}/stop-watching';
|
||||||
|
|
||||||
when(() => client.post(path)).thenAnswer(
|
when(() => client.post(path, data: {})).thenAnswer(
|
||||||
(_) async => successResponse(path, data: <String, dynamic>{}));
|
(_) async => successResponse(path, data: <String, dynamic>{}));
|
||||||
|
|
||||||
final res = await channelApi.stopWatching(channelId, channelType);
|
final res = await channelApi.stopWatching(channelId, channelType);
|
||||||
|
|
||||||
expect(res, isNotNull);
|
expect(res, isNotNull);
|
||||||
|
|
||||||
verify(() => client.post(path)).called(1);
|
verify(() => client.post(path, data: {})).called(1);
|
||||||
verifyNoMoreInteractions(client);
|
verifyNoMoreInteractions(client);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user