Revision control
Copy as Markdown
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
import XCTest
@testable import WebEngine
final class BrowserURLTests: XCTestCase {
func testLoadURLGivenNotAURLThenDoesntCreate() {
let url = URL(string: "blablablablabla")!
let context = BrowsingContext(type: .internalNavigation, url: url)
let subject = BrowserURL(browsingContext: context)
XCTAssertNil(subject)
}
func testLoadURLGivenExampleURLThenCreate() {
let context = BrowsingContext(type: .internalNavigation, url: url)
let subject = BrowserURL(browsingContext: context)
XCTAssertNotNil(subject)
}
}