Skip to content

Commit 03cb866

Browse files
committed
Fix tests by specifying cyclic url
1 parent ee18e75 commit 03cb866

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/ConvAPITests/ConvAPITests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ struct APIError: Codable, Error {
3232

3333
class ConvAPITests: XCTestCase {
3434

35-
static let url = URL(string: "http://localhost:1337")!
35+
static let url = URL(string: "https://uninterested-hosiery-bass.cyclic.app")!
3636

3737
lazy var api: ConvAPI = {
3838
return ConvAPI(requester: URLSession(configuration: URLSessionConfiguration.default, delegate: nil, delegateQueue: OperationQueue()))
@@ -141,7 +141,7 @@ class ConvAPITests: XCTestCase {
141141
}
142142

143143
func testComplexRedirection() async throws {
144-
let headers = ["X-LOCATION": "http://localhost:1337/get?name=test"]
144+
let headers = ["X-LOCATION": "\(ConvAPITests.url)/get?name=test"]
145145
let post = Post(name: "test")
146146
let responsePost: Post = try await api.request(method: .GET, baseURL: ConvAPITests.url, resource: "/redirect", headers: headers, error: APIError.self)
147147
XCTAssertEqual(responsePost, post)

0 commit comments

Comments
 (0)