Merge pull request #565 from GetStream/fix/channel-stop-watching
This commit is contained in:
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user