in FBSDKGamingServicesKit/FBSDKGamingServicesKitTests/Internal/TournamentUpdaterTest.swift [134:152]
func testHandlingUpdateSuccessFalse() throws {
var completionWasInvoked = false
updater.update(tournament: tournament, score: score) { result in
switch result {
case let .failure(error):
guard case .decoding = error else {
return XCTFail("Should fail with decoding error but instead failed with: \(error)")
}
case .success:
XCTFail("Should not succeed")
}
completionWasInvoked = true
}
let completion = try XCTUnwrap(factory.capturedRequests.first?.capturedCompletionHandler)
completion(nil, TournamentUpdateGraphAPIResults.successFalse, nil)
XCTAssert(completionWasInvoked)
}