From c7eeb35ef98cb033fa069c1a42239cc08bd10c65 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Mon, 17 May 2021 12:35:13 +0200 Subject: [PATCH] add test --- .../stream_chat/test/src/models/filter_test.dart | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/stream_chat/test/src/models/filter_test.dart b/packages/stream_chat/test/src/models/filter_test.dart index c73c0d0b..e09aff53 100644 --- a/packages/stream_chat/test/src/models/filter_test.dart +++ b/packages/stream_chat/test/src/models/filter_test.dart @@ -180,6 +180,19 @@ void main() { '{"$key":{"${FilterOperator.in_.rawValue}":${json.encode(values)}}}', ); }); + + test('custom with no operator', () { + const key = 'testKey'; + const values = ['testValue']; + final filter = Filter.custom(key: key, value: values); + final encoded = json.encode(filter); + expect( + encoded, + '{"$key":${json.encode(values)}}', + ); + print('asdasda'); + print('{"$key":${json.encode(values)}}'); + }); }); test('groupedFilter', () {