Merge "AccountIT: Add test for adding email without confirmation"
This commit is contained in:
@@ -436,6 +436,17 @@ public class AccountIT extends AbstractDaemonTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void cannotAddNonConfirmedEmailWithoutModifyAccountPermission() throws Exception {
|
||||
TestAccount account = accounts.create(name("user"));
|
||||
EmailInput input = new EmailInput();
|
||||
input.email = "test@test.com";
|
||||
input.noConfirmation = true;
|
||||
setApiUser(user);
|
||||
exception.expect(AuthException.class);
|
||||
gApi.accounts().id(account.username).addEmail(input);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void deleteEmail() throws Exception {
|
||||
String email = "foo.bar@example.com";
|
||||
|
Reference in New Issue
Block a user