Merge pull request #899 from GetStream/fix/tests

This commit is contained in:
Sahil Kumar
2022-02-14 20:07:22 +05:30
committed by GitHub
2 changed files with 4 additions and 3 deletions
@@ -1322,7 +1322,8 @@ class Channel {
/// Remove the ban for the user with given [userID] in the channel. /// Remove the ban for the user with given [userID] in the channel.
@Deprecated( @Deprecated(
"Use 'unbanMember' instead. This method will be removed in v4.0.0") "Use 'unbanMember' instead. This method will be removed in v4.0.0",
)
Future<EmptyResponse> unbanUser(String userID) => unbanMember(userID); Future<EmptyResponse> unbanUser(String userID) => unbanMember(userID);
/// Remove the ban for the member with given [userID] in the channel. /// Remove the ban for the member with given [userID] in the channel.
@@ -175,14 +175,14 @@ void main() {
test('markAllRead', () async { test('markAllRead', () async {
const path = '/channels/read'; const path = '/channels/read';
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.markAllRead(); final res = await channelApi.markAllRead();
expect(res, isNotNull); expect(res, isNotNull);
verify(() => client.post(path)).called(1); verify(() => client.post(path, data: {})).called(1);
verifyNoMoreInteractions(client); verifyNoMoreInteractions(client);
}); });