mirror of
https://github.com/deneraraujo/OpenVPNAdapter.git
synced 2026-02-11 00:00:08 +08:00
Update reachability test
This commit is contained in:
@@ -32,14 +32,12 @@ class OpenVPNReachabilityTests: XCTestCase {
|
||||
let reachabilityExpectation = expectation(description: "me.ss-abramchuk.openvpn-adapter.reachability")
|
||||
|
||||
let reachability = OpenVPNReachability()
|
||||
reachability.reachabilityStatusChangedBlock = { status in
|
||||
reachability.startTracking { (status) in
|
||||
if case OpenVPNReachabilityStatus.reachableViaWiFi = status {
|
||||
reachabilityExpectation.fulfill()
|
||||
}
|
||||
}
|
||||
|
||||
reachability.startTracking()
|
||||
|
||||
DispatchQueue.main.asyncAfter(deadline: .now()) {
|
||||
try? interface.setPower(false)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user