Skip to content

Commit

Permalink
Improve token expiration test
Browse files Browse the repository at this point in the history
  • Loading branch information
funkyboy committed Jun 5, 2018
1 parent c7efe08 commit 936955b
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions Spec/Auth.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3718,20 +3718,14 @@ class Auth : QuickSpec {
it ("receives a 40142 error from the server") {
waitUntil(timeout: testTimeout) { done in
client.connection.once(.connected) { stateChange in
delay(tokenDuration + 1) {
client.connection.once(.disconnected) { stateChange in
expect(stateChange!.reason!.code).to(equal(40142))
expect(stateChange!.reason!.description).to(contain("Key/token status changed (expire)"))
done()
}
}
client.connect()
}
waitUntil(timeout: testTimeout) { done in
client.connection.once(.disconnected) { stateChange in
expect(stateChange!.reason!.code).to(equal(40142))
expect(stateChange!.reason!.description).to(contain("Key/token status changed (expire)"))
done()
}
}

}
}

Expand Down

0 comments on commit 936955b

Please sign in to comment.