diff --git a/Tests/MoyaTests/EndpointSpec.swift b/Tests/MoyaTests/EndpointSpec.swift index 5a3b468af..2ab462a14 100644 --- a/Tests/MoyaTests/EndpointSpec.swift +++ b/Tests/MoyaTests/EndpointSpec.swift @@ -448,10 +448,10 @@ final class EndpointSpec: QuickSpec { context("when task is .downloadParameters") { it("should correctly acknowledge as equal for the same url, headers and download destination") { - endpoint = endpoint.replacing(task: .downloadParameters(parameters: ["test": "test2"], encoding: JSONEncoding.default, destination: { temporaryUrl, response in + endpoint = endpoint.replacing(task: .downloadParameters(parameters: ["test": "test2"], encoding: JSONEncoding.default, destination: { temporaryUrl, _ in return (destinationURL: temporaryUrl, options: []) })) - let endpointToCompare = endpoint.replacing(task: .downloadParameters(parameters: ["test": "test2"], encoding: JSONEncoding.default, destination: { temporaryUrl, response in + let endpointToCompare = endpoint.replacing(task: .downloadParameters(parameters: ["test": "test2"], encoding: JSONEncoding.default, destination: { temporaryUrl, _ in return (destinationURL: temporaryUrl, options: []) })) @@ -459,10 +459,10 @@ final class EndpointSpec: QuickSpec { } it("should correctly acknowledge as not equal for the same url, headers, download destionation and different parameters") { - endpoint = endpoint.replacing(task: .downloadParameters(parameters: ["test": "test2"], encoding: JSONEncoding.default, destination: { temporaryUrl, response in + endpoint = endpoint.replacing(task: .downloadParameters(parameters: ["test": "test2"], encoding: JSONEncoding.default, destination: { temporaryUrl, _ in return (destinationURL: temporaryUrl, options: []) })) - let endpointToCompare = endpoint.replacing(task: .downloadParameters(parameters: ["test": "test3"], encoding: JSONEncoding.default, destination: { temporaryUrl, response in + let endpointToCompare = endpoint.replacing(task: .downloadParameters(parameters: ["test": "test3"], encoding: JSONEncoding.default, destination: { temporaryUrl, _ in return (destinationURL: temporaryUrl, options: []) })) diff --git a/Tests/MoyaTests/NetworkLoggerPluginSpec.swift b/Tests/MoyaTests/NetworkLoggerPluginSpec.swift index 6b10ae615..910a2d0a0 100644 --- a/Tests/MoyaTests/NetworkLoggerPluginSpec.swift +++ b/Tests/MoyaTests/NetworkLoggerPluginSpec.swift @@ -66,7 +66,7 @@ final class NetworkLoggerPluginSpec: QuickSpec { it("outputs a validation error message") { let response = Response(statusCode: 500, data: "Internal error".data(using: .utf8)!, response: HTTPURLResponse(url: URL(string: url(GitHub.zen))!, mimeType: nil, expectedContentLength: 0, textEncodingName: nil)) - let validationResponseError = AFError.responseValidationFailed(reason: .unacceptableStatusCode(code:500)) + let validationResponseError = AFError.responseValidationFailed(reason: .unacceptableStatusCode(code: 500)) let result: Result = .failure(.underlying(validationResponseError, response)) plugin.didReceive(result, target: GitHub.zen)