diff --git a/Tests/NetworkLayerTests/Classes/Helpers/Mocks/AuthenticatorMock.swift b/Tests/NetworkLayerTests/Classes/Helpers/Mocks/AuthenticatorMock.swift index 4b1d42b..492469f 100644 --- a/Tests/NetworkLayerTests/Classes/Helpers/Mocks/AuthenticatorMock.swift +++ b/Tests/NetworkLayerTests/Classes/Helpers/Mocks/AuthenticatorMock.swift @@ -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) diff --git a/Tests/NetworkLayerTests/Classes/Tests/UnitTests/RequestParametersEncoderTests.swift b/Tests/NetworkLayerTests/Classes/Tests/UnitTests/RequestParametersEncoderTests.swift index 9cb4a31..32995e8 100644 --- a/Tests/NetworkLayerTests/Classes/Tests/UnitTests/RequestParametersEncoderTests.swift +++ b/Tests/NetworkLayerTests/Classes/Tests/UnitTests/RequestParametersEncoderTests.swift @@ -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? @@ -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 {