]> WPIA git - gigi.git/blobdiff - tests/org/cacert/gigi/LoginTest.java
Factor out more test-things.
[gigi.git] / tests / org / cacert / gigi / LoginTest.java
index f4bfe85fb5e71fa622d83cd46806dc30370c998c..8a71090f601aeb7c768294980263b0e55a471d51 100644 (file)
@@ -2,16 +2,10 @@ package org.cacert.gigi;
 
 import java.io.IOException;
 import static org.junit.Assert.*;
-import java.io.OutputStream;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.net.URLEncoder;
-
 import org.cacert.gigi.testUtils.ManagedTest;
 import org.junit.Test;
 
 public class LoginTest extends ManagedTest {
-       public static final String secureReference = "/account/certs/email";
 
        @Test
        public void testLoginUnverified() throws IOException {
@@ -32,11 +26,4 @@ public class LoginTest extends ManagedTest {
                assertTrue(isLoggedin(login(email, pw)));
        }
 
-       public boolean isLoggedin(String cookie) throws IOException {
-               URL u = new URL("https://" + getServerName() + secureReference);
-               HttpURLConnection huc = (HttpURLConnection) u.openConnection();
-               huc.addRequestProperty("Cookie", cookie);
-               return huc.getResponseCode() == 200;
-       }
-
 }