From 604546db382128f8a4a562523333eb69fb5742b4 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 25 Mar 2022 15:39:28 +0530 Subject: [PATCH] test(llc): add persistence update thread test Signed-off-by: xsahil03x --- .../src/db/chat_persistence_client_test.dart | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/packages/stream_chat/test/src/db/chat_persistence_client_test.dart b/packages/stream_chat/test/src/db/chat_persistence_client_test.dart index 897bbcb0..7c49cc7d 100644 --- a/packages/stream_chat/test/src/db/chat_persistence_client_test.dart +++ b/packages/stream_chat/test/src/db/chat_persistence_client_test.dart @@ -162,6 +162,23 @@ void main() { expect(channelState, isNotNull); }); + test('updateChannelThreads', () async { + const cid = 'test:cid'; + final user = User(id: 'test-user-id'); + final threads = { + 'parent-test-message': [ + Message( + id: 'test-message', + text: 'test-message', + user: user, + ownReactions: [Reaction(type: 'test', user: user)], + latestReactions: [Reaction(type: 'test', user: user)], + ) + ] + }; + persistenceClient.updateChannelThreads(cid, threads); + }); + test('updateChannelState', () async { final channelState = ChannelState(); persistenceClient.updateChannelState(channelState);