From bd836118216514ceccca5536c9f4514243b419fb Mon Sep 17 00:00:00 2001 From: Sergey Abramchuk Date: Tue, 22 Aug 2017 09:52:58 +0300 Subject: [PATCH] Update reachability test --- OpenVPN Adapter Tests/OpenVPNReachabilityTests.swift | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/OpenVPN Adapter Tests/OpenVPNReachabilityTests.swift b/OpenVPN Adapter Tests/OpenVPNReachabilityTests.swift index 85db5d1..5f86e59 100644 --- a/OpenVPN Adapter Tests/OpenVPNReachabilityTests.swift +++ b/OpenVPN Adapter Tests/OpenVPNReachabilityTests.swift @@ -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) }