]> WPIA git - gigi.git/blobdiff - tests/org/cacert/gigi/LoginTest.java
upd: refactor tests to use convenience get-stuff
[gigi.git] / tests / org / cacert / gigi / LoginTest.java
index d6c6fc4941910fc1828d29cbc17abd70e67147f9..29456c7b2a24a8d20b3580ea0801ec91ae330c79 100644 (file)
@@ -3,7 +3,6 @@ package org.cacert.gigi;
 import static org.junit.Assert.*;
 
 import java.io.IOException;
-import java.net.URL;
 
 import org.cacert.gigi.testUtils.ManagedTest;
 import org.junit.Test;
@@ -14,7 +13,7 @@ public class LoginTest extends ManagedTest {
     public void testLoginUnverified() throws IOException {
         String email = createUniqueName() + "@testmail.org";
         registerUser("an", "bn", email, TEST_PASSWORD);
-        waitForMail();
+        getMailReciever().receive();
         assertFalse(isLoggedin(login(email, TEST_PASSWORD)));
     }
 
@@ -43,7 +42,7 @@ public class LoginTest extends ManagedTest {
     }
 
     private void logout(String cookie) throws IOException {
-        cookie(new URL("https://" + getServerName() + "/logout").openConnection(), cookie).getHeaderField("Location");
+        get(cookie, "/logout").getHeaderField("Location");
     }
 
 }