Skip to content

Instantly share code, notes, and snippets.

@Kdan
Created July 6, 2020 14:18
Show Gist options
  • Select an option

  • Save Kdan/6d711c071618b7a1cf0b0d5b015375b0 to your computer and use it in GitHub Desktop.

Select an option

Save Kdan/6d711c071618b7a1cf0b0d5b015375b0 to your computer and use it in GitHub Desktop.
XCTAssertTrue(self.router.hasReceivedCalls)
XCTAssertFalse(self.reviewMock.hasReceivedCalls)
let call = self.router.calls(with: RouterMock.AlertRouterTypeFunctions.presentAlert)
XCTAssertNotNil(call)
XCTAssertEqual(call?.calls, 1)
XCTAssertEqual(call?.parameters[0] as? String, NSLocalizedString("fw_promo_mysound_hdr", comment: ""))
XCTAssertEqual(call?.parameters[1] as? String, "Update Jabra Elite 45h to get you started with MySound.")
XCTAssertEqual((call?.parameters[2] as? AlertAction)?.title, NSLocalizedString("jabra_support_fwpop_btn_later", comment: ""))
XCTAssertEqual((call?.parameters[3] as? AlertAction)?.title, NSLocalizedString("update_now", comment: ""))
XCTAssertNil(call?.parameters[4])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment