Merge branch 'stable-2.16' into stable-3.0

* stable-2.16:
  Bazel: Make build tool chain forward compatible
  AccountIT: Add test that it is possible to delete all emails

Change-Id: I167f1dd776f91628e6bc00691e214982268a97b9
This commit is contained in:
David Ostrovsky
2019-06-12 22:35:57 +02:00
2 changed files with 53 additions and 28 deletions

View File

@@ -1098,6 +1098,27 @@ public class AccountIT extends AbstractDaemonTest {
assertThat(gApi.accounts().self().get().email).isNull();
}
@Test
@Sandboxed
public void deleteAllEmails() throws Exception {
EmailInput input = new EmailInput();
input.email = "foo.bar@example.com";
input.noConfirmation = true;
gApi.accounts().self().addEmail(input);
requestScopeOperations.resetCurrentApiUser();
Set<String> allEmails = getEmails();
assertThat(allEmails).hasSize(2);
for (String email : allEmails) {
gApi.accounts().self().deleteEmail(email);
}
requestScopeOperations.resetCurrentApiUser();
assertThat(getEmails()).isEmpty();
assertThat(gApi.accounts().self().get().email).isNull();
}
@Test
public void deleteEmailFromCustomExternalIdSchemes() throws Exception {
String email = "foo.bar@example.com";