]> WPIA git - gigi.git/blobdiff - tests/org/cacert/gigi/pages/orga/TestOrgDomain.java
add: defense-in-depth mechanism to prevent unauthorized adding of groups
[gigi.git] / tests / org / cacert / gigi / pages / orga / TestOrgDomain.java
index 806ec964318c017bc23276be78eff395faf610be..b24bb83e9caa1ea6072b323d0c7b438a76cef89d 100644 (file)
@@ -7,18 +7,14 @@ import java.net.URLEncoder;
 
 import org.cacert.gigi.GigiApiException;
 import org.cacert.gigi.dbObjects.Domain;
-import org.cacert.gigi.dbObjects.Group;
 import org.cacert.gigi.dbObjects.Organisation;
-import org.cacert.gigi.testUtils.ClientTest;
+import org.cacert.gigi.testUtils.OrgTest;
 import org.junit.Test;
 
-public class TestOrgDomain extends ClientTest {
+public class TestOrgDomain extends OrgTest {
+
+    public TestOrgDomain() throws IOException, GigiApiException {
 
-    public TestOrgDomain() throws IOException {
-        makeAssurer(u.getId());
-        u.grantGroup(u, Group.ORGASSURER);
-        clearCaches();
-        cookie = login(email, TEST_PASSWORD);
     }
 
     @Test
@@ -76,11 +72,6 @@ public class TestOrgDomain extends ClientTest {
         assertEquals(0, u.getDomains().length);
     }
 
-    private Organisation createUniqueOrg() throws GigiApiException {
-        Organisation o1 = new Organisation(createUniqueName(), "st", "pr", "city", "test@example.com", "", "", u);
-        return o1;
-    }
-
     @Test
     public void testBusinessAddInvalid() throws IOException, GigiApiException {
         Organisation o1 = createUniqueOrg();