Skip to content

Commit

Permalink
fix(GiniHealthAPILibrary): Fix error type when fetching user access t…
Browse files Browse the repository at this point in the history
…oken and the error is not `unauthorized` one

 this is fixing also the `testResolvePaymentRequestFails` and `testCreatePaymentRequest` tests that are failing
PP-67
  • Loading branch information
ValentinaIancu-Gini committed Feb 20, 2024
1 parent 7463c5f commit 64b0f41
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ extension SessionManager: SessionAuthenticationProtocol {
}
}
} else {
completion(.failure(.unknown(response: error.response, data: nil)))
completion(.failure(error))
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class HealthAPILibraryPinningWrongCertificatesTests: XCTestCase {
case .success:
XCTFail("creating a payment request should have failed due to wrong pinning certificates")
case let .failure(error):
XCTAssertEqual(error, GiniHealthAPILibrary.GiniError.unknown())
XCTAssertEqual(error, GiniHealthAPILibrary.GiniError.noResponse)
expect.fulfill()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class GiniHealthSDKPinningExampleWrongCertificatesTests: XCTestCase {
case .success:
XCTFail("creating a payment request should have failed due to wrong pinning certificates")
case let .failure(error):
XCTAssertEqual(error, GiniError.unknown())
XCTAssertEqual(error, GiniError.noResponse)
expect.fulfill()
}
}
Expand Down

0 comments on commit 64b0f41

Please sign in to comment.