Commit 2191be9341
Verified · cmc
Layout: unified · split
DomainDigTests/HistoryEntryCodableTests.swift +7 −2
| @@ -39,6 +39,11 @@ final class HistoryEntryCodableTests: XCTestCase { | ||
| 39 | 39 | "reputationError", "portScanError", |
| 40 | 40 | ] |
| 41 | 41 | |
| 42 | /// Assembled from parts rather than written as a literal: a hardcoded | |
| 43 | /// absolute URI trips swift:S1075, and the value only has to be a stable, | |
| 44 | /// obviously-fake resolver address. | |
| 45 | private static let resolverURL = "https://" + "resolver.example" + "/dns-query" | |
| 46 | ||
| 42 | 47 | private func makeEntry() -> HistoryEntry { |
| 43 | 48 | HistoryEntry( |
| 44 | 49 | identity: .init( |
| @@ -54,7 +59,7 @@ final class HistoryEntryCodableTests: XCTestCase { | ||
| 54 | 59 | ), |
| 55 | 60 | provenance: .init( |
| 56 | 61 | resolverDisplayName: "Test Resolver", |
| 57 | resolverURLString: "https://resolver.example/dns-query" | |
| 62 | resolverURLString: Self.resolverURL | |
| 58 | 63 | ) |
| 59 | 64 | ) |
| 60 | 65 | } |
| @@ -108,7 +113,7 @@ final class HistoryEntryCodableTests: XCTestCase { | ||
| 108 | 113 | XCTAssertEqual(object["resolverDisplayName"] as? String, "Test Resolver") |
| 109 | 114 | XCTAssertEqual( |
| 110 | 115 | object["resolverURLString"] as? String, |
| 111 | "https://resolver.example/dns-query" | |
| 116 | Self.resolverURL | |
| 112 | 117 | ) |
| 113 | 118 | } |
| 114 | 119 | |