-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added parameter support to OAuth2Authenticatable Login
Added "login_hint" support to EnterpriseDomainInteractor Added Default Extension to OAuth2Authenticatable Added Tests Update Mocks
- Loading branch information
Showing
6 changed files
with
37 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -176,14 +176,21 @@ class EnterpriseDomainInteractorSpec: QuickSpec { | |
} | ||
|
||
it("should not yield error on success") { | ||
|
||
authentication.webAuthResult = { return .success(result: mockCredentials()) } | ||
try! enterprise.updateEmail("[email protected]") | ||
enterprise.login() { error = $0 } | ||
expect(error).toEventually(beNil()) | ||
} | ||
|
||
it("should add login_hint to login") { | ||
authentication.webAuthResult = { return .success(result: mockCredentials()) } | ||
try! enterprise.updateEmail("[email protected]") | ||
enterprise.login() { error = $0 } | ||
expect(error).toEventually(beNil()) | ||
expect(authentication.webAuth.parameters["login_hint"]) == "[email protected]" | ||
} | ||
|
||
|
||
it("should call credentials callback") { | ||
let expected = mockCredentials() | ||
authentication.webAuthResult = { return .success(result: expected) } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters