X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=tests%2Fclub%2Fwpia%2Fgigi%2FtestUtils%2FOrgTest.java;h=2d79c5a497b0e15d289ff38e699599e8cabe414d;hb=010f5d1a8bb003834222e6d854194a6c6e5e5cb7;hp=949bd2d1ebc8cc98c1754d91b80a45a9bcbf43a4;hpb=08c941629aea14473e5c42ab6f5d590be4af4bf8;p=gigi.git diff --git a/tests/club/wpia/gigi/testUtils/OrgTest.java b/tests/club/wpia/gigi/testUtils/OrgTest.java index 949bd2d1..2d79c5a4 100644 --- a/tests/club/wpia/gigi/testUtils/OrgTest.java +++ b/tests/club/wpia/gigi/testUtils/OrgTest.java @@ -4,15 +4,16 @@ import java.io.IOException; import club.wpia.gigi.GigiApiException; import club.wpia.gigi.dbObjects.Country; +import club.wpia.gigi.dbObjects.Country.CountryCodeType; import club.wpia.gigi.dbObjects.Group; import club.wpia.gigi.dbObjects.Organisation; -import club.wpia.gigi.dbObjects.Country.CountryCodeType; +import club.wpia.gigi.dbObjects.User; public class OrgTest extends ClientTest { public OrgTest() throws IOException, GigiApiException { makeAgent(u.getId()); - u.grantGroup(getSupporter(), Group.ORGASSURER); + u.grantGroup(getSupporter(), Group.ORG_AGENT); clearCaches(); cookie = login(email, TEST_PASSWORD); } @@ -21,4 +22,10 @@ public class OrgTest extends ClientTest { Organisation o1 = new Organisation(createUniqueName(), Country.getCountryByCode("DE", CountryCodeType.CODE_2_CHARS), "pr", "city", "test@example.com", "", "", u); return o1; } + + public User createOrgAdmin(Organisation o) throws GigiApiException { + User ua = User.getById(createVerificationUser("testworker", "testname", createUniqueName() + "@testdom.com", TEST_PASSWORD)); + o.addAdmin(ua, u, true); + return ua; + } }