]> WPIA git - gigi.git/commitdiff
upd: check more results in TestOrgManagement-TestSuite
authorFelix Dörre <felix@dogcraft.de>
Sun, 3 Jul 2016 19:52:31 +0000 (21:52 +0200)
committerFelix Dörre <felix@dogcraft.de>
Sun, 3 Jul 2016 19:52:31 +0000 (21:52 +0200)
Change-Id: Ia581a8df1b39f58a2dcd808a23b939e6f840b579

tests/org/cacert/gigi/pages/orga/TestOrgManagement.java

index 9700271276bca2eefe4730b8b53280fa088d83e5..6b6d567daba9a1bc065a904aead3107e178499c8 100644 (file)
@@ -38,7 +38,7 @@ public class TestOrgManagement extends OrgTest {
         for (Organisation i : Organisation.getOrganisations(0, 30)) {
             i.delete();
         }
-        executeBasicWebInteraction(cookie, CreateOrgPage.DEFAULT_PATH, "action=new&O=name&contact=mail@serv.tld&L=K%C3%B6ln&ST=" + URLEncoder.encode(DIFFICULT_CHARS, "UTF-8") + "&C=DE&comments=jkl%C3%B6loiuzfdfgjlh%C3%B6&optionalName=opname&postalAddress=postaladdress", 0);
+        assertNull(executeBasicWebInteraction(cookie, CreateOrgPage.DEFAULT_PATH, "action=new&O=name&contact=mail@serv.tld&L=K%C3%B6ln&ST=" + URLEncoder.encode(DIFFICULT_CHARS, "UTF-8") + "&C=DE&comments=jkl%C3%B6loiuzfdfgjlh%C3%B6&optionalName=opname&postalAddress=postaladdress", 0));
         Organisation[] orgs = Organisation.getOrganisations(0, 30);
         assertEquals(1, orgs.length);
         assertEquals("mail@serv.tld", orgs[0].getContactEmail());
@@ -49,14 +49,14 @@ public class TestOrgManagement extends OrgTest {
         assertEquals("postaladdress", orgs[0].getPostalAddress());
 
         User u2 = User.getById(createAssuranceUser("testworker", "testname", createUniqueName() + "@testdom.com", TEST_PASSWORD));
-        executeBasicWebInteraction(cookie, ViewOrgPage.DEFAULT_PATH + "/" + orgs[0].getId(), "email=" + URLEncoder.encode(u2.getEmail(), "UTF-8") + "&do_affiliate=y&master=y", 1);
+        assertNull(executeBasicWebInteraction(cookie, ViewOrgPage.DEFAULT_PATH + "/" + orgs[0].getId(), "email=" + URLEncoder.encode(u2.getEmail(), "UTF-8") + "&do_affiliate=y&master=y", 1));
         List<Affiliation> allAdmins = orgs[0].getAllAdmins();
         assertEquals(1, allAdmins.size());
         Affiliation affiliation = allAdmins.get(0);
         assertSame(u2, affiliation.getTarget());
         assertTrue(affiliation.isMaster());
 
-        executeBasicWebInteraction(cookie, ViewOrgPage.DEFAULT_PATH + "/" + orgs[0].getId(), "email=" + URLEncoder.encode(u.getEmail(), "UTF-8") + "&do_affiliate=y", 1);
+        assertNull(executeBasicWebInteraction(cookie, ViewOrgPage.DEFAULT_PATH + "/" + orgs[0].getId(), "email=" + URLEncoder.encode(u.getEmail(), "UTF-8") + "&do_affiliate=y", 1));
         allAdmins = orgs[0].getAllAdmins();
         assertEquals(2, allAdmins.size());
         Affiliation affiliation2 = allAdmins.get(0);
@@ -66,13 +66,13 @@ public class TestOrgManagement extends OrgTest {
         assertEquals(u.getId(), affiliation2.getTarget().getId());
         assertFalse(affiliation2.isMaster());
 
-        executeBasicWebInteraction(cookie, ViewOrgPage.DEFAULT_PATH + "/" + orgs[0].getId(), "del=" + URLEncoder.encode(u.getEmail(), "UTF-8") + "&email=&do_affiliate=y", 1);
+        assertNull(executeBasicWebInteraction(cookie, ViewOrgPage.DEFAULT_PATH + "/" + orgs[0].getId(), "del=" + URLEncoder.encode(u.getEmail(), "UTF-8") + "&email=&do_affiliate=y", 1));
         assertEquals(1, orgs[0].getAllAdmins().size());
 
-        executeBasicWebInteraction(cookie, ViewOrgPage.DEFAULT_PATH + "/" + orgs[0].getId(), "del=" + URLEncoder.encode(u2.getEmail(), "UTF-8") + "&email=&do_affiliate=y", 1);
+        assertNull(executeBasicWebInteraction(cookie, ViewOrgPage.DEFAULT_PATH + "/" + orgs[0].getId(), "del=" + URLEncoder.encode(u2.getEmail(), "UTF-8") + "&email=&do_affiliate=y", 1));
         assertEquals(0, orgs[0].getAllAdmins().size());
 
-        executeBasicWebInteraction(cookie, ViewOrgPage.DEFAULT_PATH + "/" + orgs[0].getId(), "action=updateCertificateData&O=name1&contact=&L=K%C3%B6ln&ST=%C3%9C%C3%96%C3%84%C3%9F&C=DE&comments=jkl%C3%B6loiuzfdfgjlh%C3%B6", 0);
+        assertNull(executeBasicWebInteraction(cookie, ViewOrgPage.DEFAULT_PATH + "/" + orgs[0].getId(), "action=updateCertificateData&O=name1&contact=&L=K%C3%B6ln&ST=%C3%9C%C3%96%C3%84%C3%9F&C=DE&comments=jkl%C3%B6loiuzfdfgjlh%C3%B6", 0));
         clearCaches();
         orgs = Organisation.getOrganisations(0, 30);
         assertEquals("name1", orgs[0].getName());