X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=tests%2Forg%2Fcacert%2Fgigi%2Fpages%2Fwot%2FTestTTP.java;h=34b0ca6dfc78c50d7ffad6d3c6a6a461ef72254d;hb=eec3b0e813725bd8c19f043a453c4c50f0ded34a;hp=f1180800419ba663acca8a0aa5a477c2658f1d8d;hpb=846ad43e2138f9f8d400ad9a6ba485dd8e2fd0b3;p=gigi.git diff --git a/tests/org/cacert/gigi/pages/wot/TestTTP.java b/tests/org/cacert/gigi/pages/wot/TestTTP.java index f1180800..34b0ca6d 100644 --- a/tests/org/cacert/gigi/pages/wot/TestTTP.java +++ b/tests/org/cacert/gigi/pages/wot/TestTTP.java @@ -1,36 +1,29 @@ package org.cacert.gigi.pages.wot; +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; + import java.io.IOException; -import java.net.URL; import org.cacert.gigi.GigiApiException; import org.cacert.gigi.dbObjects.Group; import org.cacert.gigi.dbObjects.ObjectCache; import org.cacert.gigi.dbObjects.User; +import org.cacert.gigi.testUtils.ClientTest; import org.cacert.gigi.testUtils.IOUtils; -import org.cacert.gigi.testUtils.ManagedTest; import org.junit.Test; -import static org.junit.Assert.*; -import static org.hamcrest.CoreMatchers.*; - -public class TestTTP extends ManagedTest { - - User u = User.getById(createVerifiedUser("fn", "ln", "test-" + createUniqueName() + "@example.org", TEST_PASSWORD)); - - String cookie = login(u.getEmail(), TEST_PASSWORD); - - URL ttpPage = new URL("https://" + getServerName() + RequestTTPPage.PATH); +public class TestTTP extends ClientTest { public TestTTP() throws IOException {} @Test public void testTTPApply() throws IOException { - String ttp = IOUtils.readURL(cookie(ttpPage.openConnection(), cookie)); + String ttp = IOUtils.readURL(get(RequestTTPPage.PATH)); assertThat(ttp, containsString("