]> WPIA git - gigi.git/blobdiff - tests/org/cacert/gigi/ping/TestHTTP.java
Fix: consolidate TestEmailReveiver interface
[gigi.git] / tests / org / cacert / gigi / ping / TestHTTP.java
index 64c9cd650e3e618d7c51cd194f3b70158554e7b1..3618532e93b808184f3f29c923f098acb2311fdc 100644 (file)
@@ -71,10 +71,9 @@ public class TestHTTP extends PingTest {
                 "&adddomain&csrf=" + csrf;
         URL u2 = sendDomainForm(u, content);
 
-        TestMail mail = getMailReciever().recieve();
+        TestMail mail = getMailReciever().receive();
         if (emailVariant == 0) {
-            String link = mail.extractLink();
-            new URL(link).openConnection().getHeaderField("");
+            mail.verify();
         }
         waitForPings(2);
 
@@ -106,7 +105,7 @@ public class TestHTTP extends PingTest {
         String httpDom = getTestProps().getProperty("domain.http");
         assumeNotNull(httpDom);
         URL u = new URL("http://" + httpDom + "/cacert-" + token + ".txt");
-        return IOUtils.readURL(new InputStreamReader(u.openStream())).trim();
+        return IOUtils.readURL(new InputStreamReader(u.openStream(), "UTF-8")).trim();
 
     }
 }