优化
This commit is contained in:
@@ -75,6 +75,13 @@ class AccountManagementServiceTest {
|
||||
assertNotEquals("Password1", captor.getValue().getPasswordHash());
|
||||
}
|
||||
|
||||
@Test void usernameAvailabilityUsesTheAuthAccountRepositoryAsTheFactSource() {
|
||||
when(repository.existsByUsername("13800138000")).thenReturn(true);
|
||||
|
||||
assertFalse(service.usernameAvailable("13800138000"));
|
||||
assertTrue(service.usernameAvailable("13900139000"));
|
||||
}
|
||||
|
||||
@Test void createDisabledAccountAndSummaryExposeLastLoginAndScope() {
|
||||
when(repository.findById(20L)).thenReturn(null);
|
||||
when(repository.existsByUsername("merchant.user")).thenReturn(false);
|
||||
|
||||
Reference in New Issue
Block a user