Skip to content

Commit

Permalink
✅ Update tests for error change
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaatttt authored and iujames committed Sep 17, 2024
1 parent 7704191 commit 9bbb0b9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Tests/AppcuesKitTests/Debugger/APIVerifierTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class APIVerifierTests: XCTestCase {
.store(in: &cancellables)

networking.onGet = { endpoint, _, completion in
completion(.failure(NetworkingError.nonSuccessfulStatusCode(500)))
completion(.failure(NetworkingError.nonSuccessfulStatusCode(500, nil)))
}

// Act
Expand Down
8 changes: 4 additions & 4 deletions Tests/AppcuesKitTests/Debugger/ScreenCapturerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class ScreenCapturerTests: XCTestCase {
// Step 1
networking.onGet = { endpoint, authorization, completion in
guard case SettingsEndpoint.settings = endpoint else { return XCTFail("Unexpected GET request") }
completion(.failure(NetworkingError.nonSuccessfulStatusCode(500)))
completion(.failure(NetworkingError.nonSuccessfulStatusCode(500, nil)))
}

// Simulate trigger the interaction to submit
Expand Down Expand Up @@ -128,7 +128,7 @@ class ScreenCapturerTests: XCTestCase {
// Step 2
networking.onPost = { endpoint, authorization, data, requestID, completion in
guard case CustomerAPIEndpoint.preSignedImageUpload = endpoint else { return XCTFail("Unexpected POST request") }
completion(.failure(NetworkingError.nonSuccessfulStatusCode(500)))
completion(.failure(NetworkingError.nonSuccessfulStatusCode(500, nil)))
}

// Simulate trigger the interaction to submit
Expand Down Expand Up @@ -170,7 +170,7 @@ class ScreenCapturerTests: XCTestCase {
networking.onPutEmptyResponse = { endpoint, authorization, data, contentType, completion in
switch endpoint {
case is URLEndpoint:
completion(.failure(NetworkingError.nonSuccessfulStatusCode(500)))
completion(.failure(NetworkingError.nonSuccessfulStatusCode(500, nil)))
default:
XCTFail("Unexpected PUT request")
}
Expand Down Expand Up @@ -224,7 +224,7 @@ class ScreenCapturerTests: XCTestCase {
// Step 4
networking.onPostEmptyResponse = { endpoint, authorization, data, completion in
guard case CustomerAPIEndpoint.screenCapture = endpoint else { return XCTFail("Unexpected POST request") }
completion(.failure(NetworkingError.nonSuccessfulStatusCode(500)))
completion(.failure(NetworkingError.nonSuccessfulStatusCode(500, nil)))
}

// Simulate trigger the interaction to submit
Expand Down
2 changes: 1 addition & 1 deletion Tests/AppcuesKitTests/DeepLinkHandlerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class DeepLinkHandlerTests: XCTestCase {
XCTAssertFalse(published)
guard case .preview = trigger else { return XCTFail() }
loaderCalled = true
completion?(.failure(NetworkingError.nonSuccessfulStatusCode(404)))
completion?(.failure(NetworkingError.nonSuccessfulStatusCode(404, nil)))
}

var toastShown = false
Expand Down

0 comments on commit 9bbb0b9

Please sign in to comment.