Skip to content

Commit

Permalink
In Xcode 15 XCTAssertEqual(request.httpMethod, "patch") fails with Op…
Browse files Browse the repository at this point in the history
…tional("PATCH")") is not equal to ("Optional("patch"). But on CI in Xcode 14.2 it fails with opposite message Optional("patch")") is not equal to ("Optional("PATCH"). Thus to satisfy both Xcodes I've forced to use uppercase in this assertion.
  • Loading branch information
maratal committed Sep 25, 2023
1 parent d8c8a75 commit 463e669
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Test/Tests/RestClientTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1822,7 +1822,7 @@ class RestClientTests: XCTestCase {
let url = try XCTUnwrap(request.url, "No request url found")
let acceptHeaderValue = try XCTUnwrap(request.allHTTPHeaderFields?["Accept"], "Accept HTTP Header is missing")

XCTAssertEqual(request.httpMethod, "patch")
XCTAssertEqual(request.httpMethod!.uppercased(), "PATCH")
XCTAssertEqual(url.absoluteString, "https://rest.ably.io:443/feature?foo=1")
XCTAssertEqual(acceptHeaderValue, "application/x-msgpack,application/json")
}
Expand Down

0 comments on commit 463e669

Please sign in to comment.