X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=tests%2Forg%2Fcacert%2Fgigi%2Fpages%2Faccount%2FTestMailManagement.java;h=190dd5a0237e4ba98d1751ba7ff9e99f7747a456;hb=5f0c781007ae0ddce24057654a0ab095bc2a2b5b;hp=079b2d0425fb01561324b7b114430fc0f24ed7f4;hpb=8989aa1f0dca5ed1b6ef8ba5f786f5192f8bf950;p=gigi.git diff --git a/tests/org/cacert/gigi/pages/account/TestMailManagement.java b/tests/org/cacert/gigi/pages/account/TestMailManagement.java index 079b2d04..190dd5a0 100644 --- a/tests/org/cacert/gigi/pages/account/TestMailManagement.java +++ b/tests/org/cacert/gigi/pages/account/TestMailManagement.java @@ -13,6 +13,7 @@ import org.cacert.gigi.dbObjects.EmailAddress; import org.cacert.gigi.dbObjects.ObjectCache; import org.cacert.gigi.dbObjects.User; import org.cacert.gigi.localisation.Language; +import org.cacert.gigi.pages.account.mail.MailOverview; import org.cacert.gigi.testUtils.ManagedTest; import org.junit.Test; @@ -37,7 +38,7 @@ public class TestMailManagement extends ManagedTest { @Test public void testMailAddInternalFaulty() { try { - new EmailAddress("kurti ", u); + new EmailAddress(u, "kurti "); fail(); } catch (IllegalArgumentException e) { // Intended. @@ -71,15 +72,15 @@ public class TestMailManagement extends ManagedTest { @Test public void testMailSetDefaultWeb() throws MalformedURLException, UnsupportedEncodingException, IOException, InterruptedException, GigiApiException { - ObjectCache.clearAllCashes(); EmailAddress adrr = createVerifiedEmail(u); assertNull(executeBasicWebInteraction(cookie, path, "makedefault&emailid=" + adrr.getId())); + ObjectCache.clearAllCaches(); assertEquals(User.getById(u.getId()).getEmail(), adrr.getAddress()); } @Test public void testMailSetDefaultWebUnverified() throws MalformedURLException, UnsupportedEncodingException, IOException, InterruptedException, GigiApiException { - EmailAddress adrr = new EmailAddress(createUniqueName() + "test@test.tld", u); + EmailAddress adrr = new EmailAddress(u, createUniqueName() + "test@test.tld"); adrr.insert(Language.getInstance(Locale.ENGLISH)); assertNotNull(executeBasicWebInteraction(cookie, path, "makedefault&emailid=" + adrr.getId())); assertNotEquals(User.getById(u.getId()).getEmail(), adrr.getAddress());