Skip to content

Commit

Permalink
Update Unit Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ns-vasilev committed May 11, 2024
1 parent 1ba39f7 commit a59d787
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ final class AuthenticatorMock: IAuthenticator {
var invokedApplyParameters: (credential: Credential, urlRequest: URLRequest)?
var invokedApplyParametersList = [(credential: Credential, urlRequest: URLRequest)]()

func apply(_ credential: Credential, to urlRequest: URLRequest) async throws {
func apply(_ credential: Credential, to urlRequest: inout URLRequest) async throws {
invokedApply = true
invokedApplyCount += 1
invokedApplyParameters = (credential, urlRequest)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ final class RequestParametersEncoderTests: XCTestCase {

func test_thatRequestParametersEncoderThrowsAnError_whenURLIsNotValid() {
// given
var requestMock = URLRequest.fake(string: .wrongURL)
var requestMock = URLRequest.fake(string: .domainName)
requestMock.url = nil

// when
var receivedError: NSError?
Expand All @@ -60,7 +61,6 @@ final class RequestParametersEncoderTests: XCTestCase {

private extension String {
static let domainName = "https://google.com"
static let wrongURL = "http://example.com:-80"
}

private extension Dictionary where Self.Key == String, Self.Value == String {
Expand Down

0 comments on commit a59d787

Please sign in to comment.