Merge branch 'develop' into hotfix/unreadIndicator

This commit is contained in:
Salvatore Giordano
2021-08-31 14:47:13 +02:00
committed by GitHub
4 changed files with 38 additions and 4 deletions
+1
View File
@@ -3,6 +3,7 @@
🐞 Fixed
- Fixed unread indicator not updating correctly
- Fix `channel.show` not working because of null body
## 2.2.0
@@ -292,6 +292,7 @@ class ChannelApi {
) async {
final response = await _client.post(
'${_getChannelUrl(channelId, channelType)}/show',
data: {},
);
return EmptyResponse.fromJson(response.data);
}
@@ -550,14 +550,21 @@ void main() {
final path = '${_getChannelUrl(channelId, channelType)}/show';
when(() => client.post(path)).thenAnswer(
(_) async => successResponse(path, data: <String, dynamic>{}));
when(() => client.post(
path,
data: {},
))
.thenAnswer(
(_) async => successResponse(path, data: <String, dynamic>{}));
final res = await channelApi.showChannel(channelId, channelType);
expect(res, isNotNull);
verify(() => client.post(path)).called(1);
verify(() => client.post(
path,
data: {},
)).called(1);
verifyNoMoreInteractions(client);
});