]> WPIA git - gigi.git/blobdiff - tests/org/cacert/gigi/testUtils/OrgTest.java
add: defense-in-depth mechanism to prevent unauthorized adding of groups
[gigi.git] / tests / org / cacert / gigi / testUtils / OrgTest.java
index 8ae7e2c901e29a7935de5ff1a525b48a3d145f1b..5a42a4a6d8d44932d84a136da2aa8d339eb32df3 100644 (file)
@@ -3,20 +3,22 @@ package org.cacert.gigi.testUtils;
 import java.io.IOException;
 
 import org.cacert.gigi.GigiApiException;
+import org.cacert.gigi.dbObjects.Country;
+import org.cacert.gigi.dbObjects.Country.CountryCodeType;
 import org.cacert.gigi.dbObjects.Group;
 import org.cacert.gigi.dbObjects.Organisation;
 
 public class OrgTest extends ClientTest {
 
-    public OrgTest() throws IOException {
+    public OrgTest() throws IOException, GigiApiException {
         makeAssurer(u.getId());
-        u.grantGroup(u, Group.ORGASSURER);
+        u.grantGroup(getSupporter(), Group.ORGASSURER);
         clearCaches();
         cookie = login(email, TEST_PASSWORD);
     }
 
     public Organisation createUniqueOrg() throws GigiApiException {
-        Organisation o1 = new Organisation(createUniqueName(), "st", "pr", "city", "test@example.com", "", "", u);
+        Organisation o1 = new Organisation(createUniqueName(), Country.getCountryByCode("DE", CountryCodeType.CODE_2_CHARS), "pr", "city", "test@example.com", "", "", u);
         return o1;
     }
 }