Skip to content

Commit

Permalink
fixed tests for macos 13
Browse files Browse the repository at this point in the history
  • Loading branch information
ikorich committed Oct 21, 2023
1 parent 7cba848 commit 30a123c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ final class SystemSettingsAccessProtocolTests: XCTestCase {
}

func testPath_failed() throws {
XCTAssertNotNil(SystemSettingsFailedMock.test.path)
if #available(macOS 14.0, *) {
XCTAssertNotNil(SystemSettingsFailedMock.test.path)
} else {
XCTAssertNil(SystemSettingsFailedMock.test.path)
}
}

func testPath_internal_failed() throws {
Expand Down
11 changes: 10 additions & 1 deletion Tests/SystemSettingsAccessTests/SystemSettingsNetworkTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,16 @@ final class SystemSettingsNetworkTest: XCTestCase {
for key in SystemSettingsNetwork.allCases {
XCTAssertFalse(String(describing: key).isEmpty)
XCTAssertFalse(key.rawValue.isEmpty)
XCTAssertNotNil(key.path)
if #available(macOS 14.0, *) {
XCTAssertNotNil(key.path)
} else {
let ignoreList: [SystemSettingsNetwork] = [.wifi, .ethernetDetails, .modemDetails, .vpnDetails, .vpnOnDemand]
if ignoreList.contains(key) {
XCTAssertNil(key.path)
} else {
XCTAssertNotNil(key.path)
}
}
}
}
}

0 comments on commit 30a123c

Please sign in to comment.