From 4f6e778f88b37b3ee21a140940bc205696ca9818 Mon Sep 17 00:00:00 2001 From: Martin Walsh Date: Fri, 10 Mar 2017 14:14:59 +0000 Subject: [PATCH] Tests - Check Telemetry --- Auth0Tests/AuthenticationSpec.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Auth0Tests/AuthenticationSpec.swift b/Auth0Tests/AuthenticationSpec.swift index 3eb02cb2e..6fa75e56d 100644 --- a/Auth0Tests/AuthenticationSpec.swift +++ b/Auth0Tests/AuthenticationSpec.swift @@ -724,12 +724,17 @@ class AuthenticationSpec: QuickSpec { describe("spawn WebAuth instance") { - it("should return a WebAuth instance with matching authentication credentials") { + it("should return a WebAuth instance with matching credentials") { let webAuth = auth.webAuth(withConnection: "facebook") expect(webAuth.clientId) == auth.clientId expect(webAuth.url) == auth.url } + it("should return a WebAuth instance with matching telemetry") { + let webAuth = auth.webAuth(withConnection: "facebook") as! SafariWebAuth + expect(webAuth.telemetry.info) == auth.telemetry.info + } + it("should return a WebAuth instance with matching connection") { let webAuth = auth.webAuth(withConnection: "facebook") as! SafariWebAuth expect(webAuth.parameters["connection"]) == "facebook"