Closed soffes closed 8 years ago
I've tested this throughly both in DVR and in an application using DVR. Everything works as expected!
Here's an example. In this client, it's one request to get a token and one request to show the user to build a full Account (token + user). This passes as expected with this change :grinning:
func testSignIn() {
let expectation = expectationWithDescription("Networking")
let dvr = Session(cassetteName: "sign-in")
dvr.beginRecording()
let client = AuthorizationClient(session: dvr)
client.signIn(username: "soffes", password: "REDACTED_PASSWORD") {
switch $0 {
case .Success(let account):
XCTAssertEqual("REDACTED_TOKEN", account.accessToken)
XCTAssertEqual("soffes", account.user.username)
case .Failure(let message):
XCTFail(message)
}
dvr.endRecording() {
expectation.fulfill()
}
}
waitForExpectationsWithTimeout(1, handler: nil)
}
@ayanonagon ready to go!
Support for recording multiple interactions. This also includes #29 since the recorded cassettes had plain text in them.