Skip to content

Commit

Permalink
Fix remaining failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joemasilotti committed Nov 15, 2023
1 parent e455709 commit 5b0b66e
Show file tree
Hide file tree
Showing 2 changed files with 167 additions and 200 deletions.
39 changes: 5 additions & 34 deletions Tests/Turbo Navigator/TurboNavigationDelegateTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,12 @@ import SafariServices
import XCTest

final class TurboNavigationDelegateTests: TurboNavigator {
// func test_controllerForProposal_defaultsToVisitableViewController() throws {
// let url = URL(string: "https://example.com")!
//
// let result = delegate.handle(proposal: VisitProposal(url: url))
//
// XCTAssertEqual(result, .accept)
// }
//
// func test_openExternalURL_presentsSafariViewController() throws {
// let url = URL(string: "https://example.com")!
// let controller = TestableNavigationController()
//
// delegate.openExternalURL(url, from: controller)
//
// XCTAssert(controller.presentedViewController is SFSafariViewController)
// XCTAssertEqual(controller.modalPresentationStyle, .pageSheet)
// }
func test_controllerForProposal_defaultsToVisitableViewController() throws {
let url = URL(string: "https://example.com")!

// MARK: Private
let proposal = VisitProposal(url: url, options: VisitOptions())
let result = delegate.handle(proposal: proposal)

// private let delegate = DefaultDelegate()
}

// MARK: - DefaultDelegate

private class DefaultDelegate {
func session(_ session: Session, didFailRequestForVisitable visitable: Visitable, error: Error) {}
}

// MARK: - VisitProposal extension

private extension VisitProposal {
init(url: URL) {
let url = url
let options = VisitOptions(action: .advance, response: nil)
self.init(url: url, options: options)
XCTAssertEqual(result, .accept)
}
}
Loading

0 comments on commit 5b0b66e

Please sign in to comment.