Skip to content

Commit

Permalink
Fix SwiftLint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
BasThomas committed Aug 31, 2021
1 parent a075bd0 commit d7fa40d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Tests/MoyaTests/EndpointSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -448,21 +448,21 @@ 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: [])
}))

expect(endpoint) == endpointToCompare
}

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: [])
}))

Expand Down
2 changes: 1 addition & 1 deletion Tests/MoyaTests/NetworkLoggerPluginSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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<Moya.Response, MoyaError> = .failure(.underlying(validationResponseError, response))

plugin.didReceive(result, target: GitHub.zen)
Expand Down

0 comments on commit d7fa40d

Please sign in to comment.