Skip to content

Commit

Permalink
Fix unit tests that required @mainactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernando Olivares committed Sep 23, 2024
1 parent 5f597e5 commit 6c5d9f2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Tests/Turbo/SessionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class SessionTests: XCTestCase {
XCTAssertTrue(sessionDelegate.sessionDidStartRequestCalled)
}

@MainActor
func test_coldBootVisit_whenVisitSucceeds_callsSessionDidLoadWebViewDelegateMethod() async {
await visit("/")

Expand Down Expand Up @@ -106,6 +107,7 @@ class SessionTests: XCTestCase {
XCTAssertEqual(error as? TurboError, TurboError.pageLoadFailure)
}

@MainActor
func test_coldBootVisit_Turbolinks5Compatibility_loadsThePageAndSetsTheAdapter() async throws {
await visit("/turbolinks")

Expand All @@ -115,6 +117,7 @@ class SessionTests: XCTestCase {
XCTAssertTrue(try XCTUnwrap(result as? Bool))
}

@MainActor
func test_coldBootVisit_Turbolinks5_3Compatibility_loadsThePageAndSetsTheAdapter() async throws {
await visit("/turbolinks-5.3")

Expand Down

0 comments on commit 6c5d9f2

Please sign in to comment.