diff --git a/Spec/Auth.swift b/Spec/Auth.swift index 49deed8d7..71b2e1af4 100644 --- a/Spec/Auth.swift +++ b/Spec/Auth.swift @@ -3738,7 +3738,7 @@ class Auth : QuickSpec { it("fails to connect with reason 'invalid signature'") { waitUntil(timeout: testTimeout) { done in - client.connection.once(.failed) { stateChange in + client.connection.once(.disconnected) { stateChange in expect(stateChange!.reason!.code).to(equal(40144)) expect(stateChange!.reason!.description).to(contain("invalid signature")) done() @@ -3835,7 +3835,7 @@ class Auth : QuickSpec { it("fails to connect") { waitUntil(timeout: testTimeout) { done in - client.connection.once(.failed) { stateChange in + client.connection.once(.disconnected) { stateChange in expect(stateChange!.reason!.code).to(equal(40144)) expect(stateChange!.reason!.description).to(contain("invalid signature")) done()