X-Git-Url: https://code.wpia.club/?p=gigi.git;a=blobdiff_plain;f=tests%2Fclub%2Fwpia%2Fgigi%2Fpages%2Fadmin%2FTestSEAdminPageCertSearch.java;h=e61f559ee8dfed4918679434a107ec9d74165a46;hp=dd7d1970614d99291c172da74418857087abc3ea;hb=d6fca4581fb8a65e2f84f227cdf32b080a58ab10;hpb=ca40eec05f7b3e6bd02014c30448af786aace969;ds=sidebyside diff --git a/tests/club/wpia/gigi/pages/admin/TestSEAdminPageCertSearch.java b/tests/club/wpia/gigi/pages/admin/TestSEAdminPageCertSearch.java index dd7d1970..e61f559e 100644 --- a/tests/club/wpia/gigi/pages/admin/TestSEAdminPageCertSearch.java +++ b/tests/club/wpia/gigi/pages/admin/TestSEAdminPageCertSearch.java @@ -39,7 +39,7 @@ public class TestSEAdminPageCertSearch extends ClientTest { cookie = login(email, TEST_PASSWORD); assertEquals(302, post(cookie, SupportEnterTicketPage.PATH, "ticketno=a20140808.8&setTicket=action", 0).getResponseCode()); - certMail = uniq + "_certOwner@example.com"; + certMail = uniq + "_certowner@example.com"; int id = createVerifiedUser("fn", "ln", certMail, TEST_PASSWORD); User u1 = User.getById(id); KeyPair kp = generateKeypair(); @@ -73,22 +73,11 @@ public class TestSEAdminPageCertSearch extends ClientTest { public void testRevoke() throws IOException { URLConnection conn = post(Certificates.SUPPORT_PATH + "/" + c.getSerial(), "action=revoke"); assertEquals("https://" + ServerConstants.getHostNamePortSecure(Host.WWW) + Certificates.SUPPORT_PATH + "/" + c.getSerial(), conn.getHeaderField("Location")); - boolean hadSupport = false; - boolean hadUser = false; for (int i = 0; i < 2; i++) { - TestMail tm = getMailReceiver().receive(); - if (tm.getTo().equals(ServerConstants.getSupportMailAddress())) { - hadSupport = true; - } else if (tm.getTo().equals(certMail)) { - hadUser = true; - } else { - throw new Error("Unknown mail:" + tm.getTo()); - } + TestMail tm = getMailReceiver().receive(i == 0 ? ServerConstants.getSupportMailAddress() : certMail); assertThat(tm.getMessage(), CoreMatchers.containsString(certMail)); assertThat(tm.getMessage(), CoreMatchers.containsString(c.getSerial())); } - assertTrue(hadSupport); - assertTrue(hadUser); assertEquals(CertificateStatus.REVOKED, c.getStatus()); }