]> WPIA git - gigi.git/commitdiff
ADD: faulty web mail insert test
authorJanis Streib <janis@dogcraft.de>
Thu, 24 Jul 2014 23:51:20 +0000 (01:51 +0200)
committerJanis Streib <janis@dogcraft.de>
Thu, 24 Jul 2014 23:51:20 +0000 (01:51 +0200)
tests/org/cacert/gigi/pages/account/TestMailManagement.java

index e915278d4c4aa0395c1b15f97a9ca40d83a9bc9a..d465a0fb9805751ad2f16a339e3297419d6c5863 100644 (file)
@@ -57,4 +57,16 @@ public class TestMailManagement extends ManagedTest {
                fail();
        }
 
+       @Test
+       public void testMailAddWebFaulty() throws MalformedURLException, UnsupportedEncodingException, IOException {
+               String newMail = createUniqueName() + "uniexample.org";
+               assertNotNull(executeBasicWebInteraction(cookie, path,
+                       "addmail&newemail=" + URLEncoder.encode(newMail, "UTF-8"), 1));
+               EmailAddress[] addrs = u.getEmails();
+               for (int i = 0; i < addrs.length; i++) {
+                       if (addrs[i].getAddress().equals(newMail)) {
+                               fail();
+                       }
+               }
+       }
 }