Skip to content

Commit

Permalink
Use correct makeSearchURL initializer in AppURLsTests
Browse files Browse the repository at this point in the history
  • Loading branch information
ayoy committed Jan 2, 2024
1 parent 2b427c2 commit 70c2c35
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions DuckDuckGoTests/AppURLsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -205,20 +205,20 @@ final class AppURLsTests: XCTestCase {
}

func testSearchUrlCreatesSearchUrlWhenFloatingPointNumberIsPassed() {
let url = URL.makeSearchURL(text: "1.4")
let url = URL.makeSearchURL(query: "1.4")
XCTAssertEqual(url?.getParameter(named: "q"), "1.4")
}

func testSearchUrlCreatesSearchUrlWhenFloatingPointNumbersDivisionIsPassed() {
let url = URL.makeSearchURL(text: "1.4/3.4")
let url = URL.makeSearchURL(query: "1.4/3.4")
XCTAssertEqual(url?.getParameter(named: "q"), "1.4/3.4")

let url2 = URL.makeSearchURL(text: "4/3.4")
let url2 = URL.makeSearchURL(query: "4/3.4")
XCTAssertEqual(url2?.getParameter(named: "q"), "4/3.4")
}

func testSearchUrlCreatesWebUrlWhenIPv4WithFourOctetsIsPassed() {
let url = URL.makeSearchURL(text: "1.0.0.4/3.4")
let url = URL.makeSearchURL(query: "1.0.0.4/3.4")
XCTAssertEqual(url?.absoluteString, "http://1.0.0.4/3.4")
}

Expand Down

0 comments on commit 70c2c35

Please sign in to comment.