From d7fa40d3788a6c10f41991191c7fc20e6571fdf4 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Tue, 31 Aug 2021 13:40:34 +0100 Subject: [PATCH] Fix SwiftLint warnings --- Tests/MoyaTests/EndpointSpec.swift | 8 ++++---- Tests/MoyaTests/NetworkLoggerPluginSpec.swift | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) 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)