X-Git-Url: https://code.wpia.club/?p=gigi.git;a=blobdiff_plain;f=tests%2Forg%2Fcacert%2Fgigi%2Fpages%2Fwot%2FTestTTP.java;h=560d1b5653559b183bbf34da63fc0013477937bf;hp=9f5aae30477202161d72d4769279c00bf6ee7e7e;hb=f2ba62daa9e723daf903d021ba2d2549b2c1895f;hpb=e87392fd58e9152531a8d1cb34cb46e370062108 diff --git a/tests/org/cacert/gigi/pages/wot/TestTTP.java b/tests/org/cacert/gigi/pages/wot/TestTTP.java index 9f5aae30..560d1b56 100644 --- a/tests/org/cacert/gigi/pages/wot/TestTTP.java +++ b/tests/org/cacert/gigi/pages/wot/TestTTP.java @@ -4,37 +4,30 @@ 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; -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("