-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding an IT for testing login via email instead of uid
Should have been done in the context of PR #50, but better late than never.
- Loading branch information
Showing
2 changed files
with
34 additions
and
22 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 |
---|---|---|
|
@@ -56,6 +56,16 @@ static void registerLdap(DynamicPropertyRegistry registry) { | |
.jsonPath("$.GeorchestraUser.username").isEqualTo("testadmin"); | ||
} | ||
|
||
public @Test void testWhoamiUsingEmail() { | ||
testClient.get().uri("/whoami")// | ||
.header("Authorization", "Basic cHNjK3Rlc3RhZG1pbkBnZW9yY2hlc3RyYS5vcmc6dGVzdGFkbWlu") // [email protected]:testadmin | ||
.exchange()// | ||
.expectStatus()// | ||
.is2xxSuccessful()// | ||
.expectBody()// | ||
.jsonPath("$.GeorchestraUser.username").isEqualTo("testadmin"); | ||
} | ||
|
||
public @Test void testWhoamiNoPasswordRevealed() { | ||
testClient.get().uri("/whoami")// | ||
.header("Authorization", "Basic dGVzdGFkbWluOnRlc3RhZG1pbg==") // testadmin:testadmin | ||
|