From 352ded64a08f1c9f51f97898aeb64239effeef68 Mon Sep 17 00:00:00 2001 From: Ajay Subramanya Date: Wed, 10 Apr 2024 09:20:01 -0500 Subject: [PATCH] Fixing tests --- Tests/KlaviyoSwiftTests/APIRequestErrorHandlingTests.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tests/KlaviyoSwiftTests/APIRequestErrorHandlingTests.swift b/Tests/KlaviyoSwiftTests/APIRequestErrorHandlingTests.swift index 2beb192c..e29f9fff 100644 --- a/Tests/KlaviyoSwiftTests/APIRequestErrorHandlingTests.swift +++ b/Tests/KlaviyoSwiftTests/APIRequestErrorHandlingTests.swift @@ -266,7 +266,7 @@ class APIRequestErrorHandlingTests: XCTestCase { initialState.requestsInFlight = [request] let store = TestStore(initialState: initialState, reducer: KlaviyoReducer()) - environment.analytics.klaviyoAPI.send = { _, _ in .failure(.rateLimitError) } + environment.analytics.klaviyoAPI.send = { _, _ in .failure(.rateLimitError(nil)) } _ = await store.send(.sendRequest) @@ -286,7 +286,7 @@ class APIRequestErrorHandlingTests: XCTestCase { initialState.requestsInFlight = [request] let store = TestStore(initialState: initialState, reducer: KlaviyoReducer()) - environment.analytics.klaviyoAPI.send = { _, _ in .failure(.rateLimitError) } + environment.analytics.klaviyoAPI.send = { _, _ in .failure(.rateLimitError(nil)) } _ = await store.send(.sendRequest) @@ -305,7 +305,7 @@ class APIRequestErrorHandlingTests: XCTestCase { initialState.requestsInFlight = [request] let store = TestStore(initialState: initialState, reducer: KlaviyoReducer()) - environment.analytics.klaviyoAPI.send = { _ in .failure(.rateLimitError(20)) } + environment.analytics.klaviyoAPI.send = { _, _ in .failure(.rateLimitError(20)) } _ = await store.send(.sendRequest)