]> WPIA git - gigi.git/blobdiff - tests/org/cacert/gigi/TestOrga.java
add: new test cases for handling of residence country in user account
[gigi.git] / tests / org / cacert / gigi / TestOrga.java
index 91afa2e76b5fb34c969c3f189da4847b66fda711..3ea186540f30eade03708f22407554d72c6e7fd6 100644 (file)
@@ -4,13 +4,15 @@ import static org.junit.Assert.*;
 
 import java.io.IOException;
 
+import org.cacert.gigi.dbObjects.CountryCode;
+import org.cacert.gigi.dbObjects.CountryCode.CountryCodeType;
 import org.cacert.gigi.dbObjects.Group;
 import org.cacert.gigi.dbObjects.Organisation;
 import org.cacert.gigi.dbObjects.User;
-import org.cacert.gigi.testUtils.ManagedTest;
+import org.cacert.gigi.testUtils.BusinessTest;
 import org.junit.Test;
 
-public class TestOrga extends ManagedTest {
+public class TestOrga extends BusinessTest {
 
     @Test
     public void testAddRm() throws GigiApiException, IOException {
@@ -22,7 +24,7 @@ public class TestOrga extends ManagedTest {
         u3.grantGroup(u1, Group.ORGASSURER);
         User u4 = User.getById(createAssuranceUser("fn", "ln", createUniqueName() + "@email.org", TEST_PASSWORD));
         u4.grantGroup(u1, Group.ORGASSURER);
-        Organisation o1 = new Organisation("name", "ST", "prov", "city", "email", "optional name", "postal address", u1);
+        Organisation o1 = new Organisation("name", CountryCode.getCountryCode("DE", CountryCodeType.CODE_2_CHARS), "prov", "city", "email", "optional name", "postal address", u1);
         assertEquals(0, o1.getAllAdmins().size());
         o1.addAdmin(u2, u1, false);
         assertEquals(1, o1.getAllAdmins().size());