-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
handle duplicate approved account request
- Loading branch information
1 parent
ce75a0a
commit 88ba6ee
Showing
6 changed files
with
53 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -227,6 +227,20 @@ public void testExecute() throws Exception { | |
assertEquals(email, data.getEmail()); | ||
assertEquals(institute, data.getInstitute()); | ||
assertEquals(null, data.getComments()); | ||
|
||
______TS("email with approved account request throws exception"); | ||
logic.createAccountRequestWithTransaction("test", "[email protected]", | ||
"institute", AccountRequestStatus.APPROVED, "comments"); | ||
accountRequest = logic.createAccountRequestWithTransaction("test", "[email protected]", | ||
"institute", AccountRequestStatus.PENDING, "comments"); | ||
requestBody = new AccountRequestUpdateRequest(accountRequest.getName(), accountRequest.getEmail(), | ||
accountRequest.getInstitute(), AccountRequestStatus.APPROVED, comments); | ||
params = new String[] {Const.ParamsNames.ACCOUNT_REQUEST_ID, accountRequest.getId().toString()}; | ||
|
||
ipe = verifyInvalidOperation(requestBody, params); | ||
|
||
assertEquals(String.format("An account request with email %s has already been approved. " | ||
+ "Please reject or delete the account request instead.", accountRequest.getEmail()), ipe.getMessage()); | ||
} | ||
|
||
@Override | ||
|
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