This repository has been archived by the owner on May 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1139 from 18F/js-fix-multiple-account-on-invite
Check for user by e-mail before sending invite
- Loading branch information
Showing
3 changed files
with
79 additions
and
47 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,10 +79,16 @@ var inviteUsersTest = []BasicProxyTest{ | |
Handlers: []Handler{ | ||
{ | ||
RequestMethod: "POST", | ||
ExpectedPath: "/invite_users", | ||
ExpectedPath: "/invite_users?redirect_uri=https://hostname", | ||
Response: "{\"new_invites\": [{\"email\": \"[email protected]\", \"userId\": \"user-guid\"}]}", | ||
ResponseCode: http.StatusOK, | ||
}, | ||
{ | ||
RequestMethod: "GET", | ||
ExpectedPath: "/Users?filter=email+eq+%22test%40example.com%22", | ||
ResponseCode: http.StatusOK, | ||
Response: "{\"resources\": [{\"active\": true, \"verified\": false, \"id\": \"user-guid\", \"externalId\": \"[email protected]\" }]}", | ||
}, | ||
{ | ||
RequestMethod: "GET", | ||
ExpectedPath: "/Users/user-guid", | ||
|
@@ -112,10 +118,16 @@ var inviteUsersTest = []BasicProxyTest{ | |
Handlers: []Handler{ | ||
{ | ||
RequestMethod: "POST", | ||
ExpectedPath: "/invite_users", | ||
ExpectedPath: "/invite_users?redirect_uri=https://hostname", | ||
Response: "{\"new_invites\": [{\"inviteLink\": \"http://some.link\", \"userId\": \"user-guid\"}]}", | ||
ResponseCode: http.StatusOK, | ||
}, | ||
{ | ||
RequestMethod: "GET", | ||
ExpectedPath: "/Users?filter=email+eq+%22test%40example.com%22", | ||
ResponseCode: http.StatusOK, | ||
Response: "{\"resources\": [{\"active\": true, \"verified\": false, \"id\": \"user-guid\", \"externalId\": \"[email protected]\" }]}", | ||
}, | ||
{ | ||
RequestMethod: "GET", | ||
ExpectedPath: "/Users/user-guid", | ||
|
@@ -145,10 +157,16 @@ var inviteUsersTest = []BasicProxyTest{ | |
Handlers: []Handler{ | ||
{ | ||
RequestMethod: "POST", | ||
ExpectedPath: "/invite_users", | ||
ExpectedPath: "/invite_users?redirect_uri=https://hostname", | ||
Response: "{\"new_invites\": [{\"email\": \"[email protected]\", \"userId\": \"user-guid\", \"inviteLink\": \"http://some.link\"}]}", | ||
ResponseCode: http.StatusOK, | ||
}, | ||
{ | ||
RequestMethod: "GET", | ||
ExpectedPath: "/Users?filter=email+eq+%22test%40example.com%22", | ||
ResponseCode: http.StatusOK, | ||
Response: "{\"resources\": [{\"active\": true, \"verified\": false, \"id\": \"user-guid\", \"externalId\": \"[email protected]\" }]}", | ||
}, | ||
{ | ||
RequestMethod: "GET", | ||
ExpectedPath: "/Users/user-guid", | ||
|
@@ -178,20 +196,15 @@ var inviteUsersTest = []BasicProxyTest{ | |
Handlers: []Handler{ | ||
{ | ||
RequestMethod: "POST", | ||
ExpectedPath: "/invite_users", | ||
ExpectedPath: "/invite_users?redirect_uri=https://hostname", | ||
Response: "{\"new_invites\": [{\"email\": \"[email protected]\", \"userId\": \"user-guid\", \"inviteLink\": \"http://some.link\"}]}", | ||
ResponseCode: http.StatusOK, | ||
}, | ||
{ | ||
RequestMethod: "GET", | ||
ExpectedPath: "/Users/user-guid", | ||
ExpectedPath: "/Users?filter=email+eq+%22test%40example.com%22", | ||
ResponseCode: http.StatusOK, | ||
Response: "{\"active\": true, \"verified\": true, \"id\": \"user-guid\", \"externalId\": \"[email protected]\" }", | ||
}, | ||
{ | ||
RequestMethod: "POST", | ||
ExpectedPath: "/v2/users", | ||
ResponseCode: http.StatusCreated, | ||
Response: "{\"resources\": [{\"active\": true, \"verified\": true, \"id\": \"user-guid\", \"externalId\": \"[email protected]\" }]}", | ||
}, | ||
}, | ||
}, | ||
|
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