Skip to content

Commit dfda66a

Browse files
committed
Changing failing test - error should be easier to read
1 parent 8dd9bbc commit dfda66a

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

libs/SalesforceSDKCore/SalesforceSDKCoreTests/DomainDiscoveryCoordinatorTests.swift

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ final class DomainDiscoveryCoordinatorTests: XCTestCase {
2525
// Given
2626
let mockWebView = MockWKWebView()
2727
let coordinator = DomainDiscoveryCoordinator()
28-
let credentials = OAuthCredentials(identifier: "test", clientId: "client123", encrypted: false)
28+
let credentials = OAuthCredentials(identifier: "test", clientId: "client123", encrypted: false)!
2929

3030
let expectedDomain = "foo.my.salesforce.com"
3131
let mockDomain = "https://\(expectedDomain)"
@@ -35,7 +35,7 @@ final class DomainDiscoveryCoordinatorTests: XCTestCase {
3535
mockWebView.simulatedCallbackURL = callbackURL
3636

3737
// When
38-
coordinator.runMyDomainsDiscovery(on: mockWebView, with: credentials!)
38+
coordinator.runMyDomainsDiscovery(on: mockWebView, with: credentials)
3939
let results = coordinator.handle(action: mockWebView.mockAction!)
4040

4141
// Then
@@ -47,14 +47,14 @@ final class DomainDiscoveryCoordinatorTests: XCTestCase {
4747
// Given
4848
let mockWebView = MockWKWebView()
4949
let coordinator = DomainDiscoveryCoordinator()
50-
let credentials = OAuthCredentials(identifier: "test", clientId: "client123", encrypted: false)
50+
let credentials = OAuthCredentials(identifier: "test", clientId: "client123", encrypted: false)!
5151
let expectedLoginHint = "[email protected]"
5252
let callbackURLString = "sfdc://discocallback?login_hint=\(expectedLoginHint.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!)"
5353
let callbackURL = URL(string: callbackURLString)!
5454
mockWebView.simulatedCallbackURL = callbackURL
5555

5656
// When
57-
coordinator.runMyDomainsDiscovery(on: mockWebView, with: credentials!)
57+
coordinator.runMyDomainsDiscovery(on: mockWebView, with: credentials)
5858
let results = coordinator.handle(action: mockWebView.mockAction!)
5959

6060
// Then
@@ -65,15 +65,15 @@ final class DomainDiscoveryCoordinatorTests: XCTestCase {
6565
// Given
6666
let mockWebView = MockWKWebView()
6767
let coordinator = DomainDiscoveryCoordinator()
68-
let credentials = OAuthCredentials(identifier: "test", clientId: "client123", encrypted: false)
68+
let credentials = OAuthCredentials(identifier: "test", clientId: "client123", encrypted: false)!
6969
let expectedDomain = "foo.my.salesforce.com"
7070
let mockDomain = "https://\(expectedDomain)"
7171
let callbackURLString = "sfdc://discocallback?my_domain=\(mockDomain.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!)"
7272
let callbackURL = URL(string: callbackURLString)!
7373
mockWebView.simulatedCallbackURL = callbackURL
7474

7575
// When
76-
coordinator.runMyDomainsDiscovery(on: mockWebView, with: credentials!)
76+
coordinator.runMyDomainsDiscovery(on: mockWebView, with: credentials)
7777
let results = coordinator.handle(action: mockWebView.mockAction!)
7878

7979
// Then
@@ -84,13 +84,13 @@ final class DomainDiscoveryCoordinatorTests: XCTestCase {
8484
// Given
8585
let mockWebView = MockWKWebView()
8686
let coordinator = DomainDiscoveryCoordinator()
87-
let credentials = OAuthCredentials(identifier: "test", clientId: "client123", encrypted: false)
87+
let credentials = OAuthCredentials(identifier: "test", clientId: "client123", encrypted: false)!
8888
let callbackURLString = "sfdc://discocallback?my_domain=&login_hint="
8989
let callbackURL = URL(string: callbackURLString)!
9090
mockWebView.simulatedCallbackURL = callbackURL
9191

9292
// When
93-
coordinator.runMyDomainsDiscovery(on: mockWebView, with: credentials!)
93+
coordinator.runMyDomainsDiscovery(on: mockWebView, with: credentials)
9494
let results = coordinator.handle(action: mockWebView.mockAction!)
9595

9696
// Then
@@ -102,12 +102,12 @@ final class DomainDiscoveryCoordinatorTests: XCTestCase {
102102
// Given
103103
let mockWebView = MockWKWebView()
104104
let coordinator = DomainDiscoveryCoordinator()
105-
let credentials = OAuthCredentials(identifier: "test", clientId: "client123", encrypted: false)
105+
let credentials = OAuthCredentials(identifier: "test", clientId: "client123", encrypted: false)!
106106
let nonCallbackURL = URL(string: "https://example.com")!
107107
mockWebView.simulatedCallbackURL = nonCallbackURL
108108

109109
// When
110-
coordinator.runMyDomainsDiscovery(on: mockWebView, with: credentials!)
110+
coordinator.runMyDomainsDiscovery(on: mockWebView, with: credentials)
111111
let results = coordinator.handle(action: mockWebView.mockAction!)
112112

113113
// Then
@@ -139,7 +139,7 @@ final class DomainDiscoveryCoordinatorTests: XCTestCase {
139139
// Given
140140
let mockWebView = MockWKWebView()
141141
let coordinator = DomainDiscoveryCoordinator()
142-
let credentials = OAuthCredentials(identifier: "test", clientId: "client123", encrypted: false)
142+
let credentials = OAuthCredentials(identifier: "test", clientId: "client123", encrypted: false)!
143143
let expectedDomain = "foo.my.salesforce.com"
144144
let mockDomain = "https://\(expectedDomain)"
145145
let expectedLoginHint = "[email protected]"
@@ -148,7 +148,7 @@ final class DomainDiscoveryCoordinatorTests: XCTestCase {
148148
mockWebView.simulatedCallbackURL = callbackURL
149149

150150
// When
151-
coordinator.runMyDomainsDiscovery(on: mockWebView, with: credentials!)
151+
coordinator.runMyDomainsDiscovery(on: mockWebView, with: credentials)
152152
let results = coordinator.handle(action: mockWebView.mockAction!)
153153

154154
// Then

0 commit comments

Comments
 (0)