@@ -11,7 +11,8 @@ class ChatThreadListViewModel_Tests: StreamChatTestCase {
1111
1212 func test_viewDidAppear_thenLoadsThreads( ) {
1313 let mockThreadListController = ChatThreadListController_Mock . mock (
14- query: . init( watch: true )
14+ query: . init( watch: true ) ,
15+ client: . mock( isLocalStorageEnabled: false )
1516 )
1617 let viewModel = ChatThreadListViewModel (
1718 threadListController: mockThreadListController
@@ -23,7 +24,8 @@ class ChatThreadListViewModel_Tests: StreamChatTestCase {
2324
2425 func test_viewDidAppear_whenAlreadyLoadedThreads_thenDoesNotLoadsThreads( ) {
2526 let mockThreadListController = ChatThreadListController_Mock . mock (
26- query: . init( watch: true )
27+ query: . init( watch: true ) ,
28+ client: . mock( isLocalStorageEnabled: false )
2729 )
2830 let viewModel = ChatThreadListViewModel (
2931 threadListController: mockThreadListController
@@ -38,7 +40,8 @@ class ChatThreadListViewModel_Tests: StreamChatTestCase {
3840
3941 func test_loadThreads_whenInitialEmptyData_whenSuccess( ) {
4042 let mockThreadListController = ChatThreadListController_Mock . mock (
41- query: . init( watch: true )
43+ query: . init( watch: true ) ,
44+ client: . mock( isLocalStorageEnabled: false )
4245 )
4346 mockThreadListController. threads_mock = [ ]
4447 let viewModel = ChatThreadListViewModel (
@@ -64,7 +67,8 @@ class ChatThreadListViewModel_Tests: StreamChatTestCase {
6467
6568 func test_loadThreads_whenCacheAvailable_whenSuccess( ) {
6669 let mockThreadListController = ChatThreadListController_Mock . mock (
67- query: . init( watch: true )
70+ query: . init( watch: true ) ,
71+ client: . mock( isLocalStorageEnabled: false )
6872 )
6973 mockThreadListController. threads_mock = [ . mock( ) ]
7074 let viewModel = ChatThreadListViewModel (
@@ -90,7 +94,8 @@ class ChatThreadListViewModel_Tests: StreamChatTestCase {
9094
9195 func test_loadThreads_whenError( ) {
9296 let mockThreadListController = ChatThreadListController_Mock . mock (
93- query: . init( watch: true )
97+ query: . init( watch: true ) ,
98+ client: . mock( isLocalStorageEnabled: false )
9499 )
95100 mockThreadListController. threads_mock = [ ]
96101 let viewModel = ChatThreadListViewModel (
@@ -110,7 +115,8 @@ class ChatThreadListViewModel_Tests: StreamChatTestCase {
110115
111116 func test_didAppearThread_whenInsideThreshold_thenLoadMoreThreads( ) {
112117 let mockThreadListController = ChatThreadListController_Mock . mock (
113- query: . init( watch: true )
118+ query: . init( watch: true ) ,
119+ client: . mock( isLocalStorageEnabled: false )
114120 )
115121 let viewModel = ChatThreadListViewModel (
116122 threadListController: mockThreadListController
@@ -131,7 +137,8 @@ class ChatThreadListViewModel_Tests: StreamChatTestCase {
131137
132138 func test_didAppearThread_whenNotInThreshold_thenDoNotLoadMoreThreads( ) {
133139 let mockThreadListController = ChatThreadListController_Mock . mock (
134- query: . init( watch: true )
140+ query: . init( watch: true ) ,
141+ client: . mock( isLocalStorageEnabled: false )
135142 )
136143 let viewModel = ChatThreadListViewModel (
137144 threadListController: mockThreadListController
@@ -152,7 +159,8 @@ class ChatThreadListViewModel_Tests: StreamChatTestCase {
152159
153160 func test_didReceiveThreadMessageNewEvent( ) {
154161 let mockThreadListController = ChatThreadListController_Mock . mock (
155- query: . init( watch: true )
162+ query: . init( watch: true ) ,
163+ client: . mock( isLocalStorageEnabled: false )
156164 )
157165 let viewModel = ChatThreadListViewModel (
158166 threadListController: mockThreadListController
0 commit comments