diff --git a/test/api/route/messages_test.dart b/test/api/route/messages_test.dart index c840c84721..de4824696b 100644 --- a/test/api/route/messages_test.dart +++ b/test/api/route/messages_test.dart @@ -454,6 +454,28 @@ void main() { }); }); + group('markAllAsRead', () { + Future checkMarkAllAsRead( + FakeApiConnection connection, { + required Map expected, + }) async { + connection.prepare(json: MarkAllAsReadResult(complete: true).toJson()); + final result = await markAllAsRead(connection); + check(connection.lastRequest).isNotNull().isA() + ..method.equals('POST') + ..url.path.equals('/api/v1/mark_all_as_read') + ..bodyFields.deepEquals(expected); + return result; + } + + test('smoke', () { + return FakeApiConnection.with_((connection) async { + final result = await checkMarkAllAsRead(connection, expected: {}); + check(result.complete).isTrue(); + }); + }); + }); + group('markStreamAsRead', () { Future checkMarkStreamAsRead( FakeApiConnection connection, {