X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=tests%2Fclub%2Fwpia%2Fgigi%2Fpages%2Faccount%2FTestCertificateRequest.java;h=023be5ae543f307ba95376b116fd419bc1391f0e;hb=87bf6551ebd440eeb363437f0a71345cd9d81192;hp=da580ccf48cae58a5d4aac3db449dc5cb553266b;hpb=2354e1d09acf1b47ef53011e4d9300d9dbd9cf21;p=gigi.git diff --git a/tests/club/wpia/gigi/pages/account/TestCertificateRequest.java b/tests/club/wpia/gigi/pages/account/TestCertificateRequest.java index da580ccf..023be5ae 100644 --- a/tests/club/wpia/gigi/pages/account/TestCertificateRequest.java +++ b/tests/club/wpia/gigi/pages/account/TestCertificateRequest.java @@ -16,7 +16,6 @@ import club.wpia.gigi.dbObjects.EmailAddress; import club.wpia.gigi.dbObjects.Group; import club.wpia.gigi.pages.account.certs.CertificateRequest; import club.wpia.gigi.testUtils.ClientTest; -import club.wpia.gigi.testUtils.TestEmailReceiver.TestMail; import club.wpia.gigi.util.AuthorizationContext; import club.wpia.gigi.util.TimeConditions; @@ -27,7 +26,7 @@ public class TestCertificateRequest extends ClientTest { AuthorizationContext ac; public TestCertificateRequest() throws GeneralSecurityException, IOException, GigiApiException { - ac = new AuthorizationContext(u, u); + ac = new AuthorizationContext(u, u, false); makeAgent(u.getId()); } @@ -95,8 +94,8 @@ public class TestCertificateRequest extends ClientTest { public void testPingPeriodOneAddress() throws IOException, GeneralSecurityException, GigiApiException { // get new email address with last ping in past String furtherEmail = createUniqueName() + "@example.org"; - EmailAddress ea = new EmailAddress(u, furtherEmail, Locale.ENGLISH); - TestMail mail = getMailReceiver().receive(furtherEmail); + new EmailAddress(u, furtherEmail, Locale.ENGLISH); + getMailReceiver().receive(furtherEmail); try (GigiPreparedStatement stmt = new GigiPreparedStatement("UPDATE `emailPinglog` SET `status`='success'::`pingState`, `when` = (now() - interval '1 months' * ?::INTEGER) WHERE `email`=? ")) { stmt.setInt(1, TimeConditions.getInstance().getEmailPingMonths()); stmt.setString(2, furtherEmail); @@ -118,8 +117,8 @@ public class TestCertificateRequest extends ClientTest { public void testPingPeriodTwoAddresses() throws IOException, GeneralSecurityException, GigiApiException { // get new email address with last ping in past String furtherEmail = createUniqueName() + "@example.org"; - EmailAddress ea = new EmailAddress(u, furtherEmail, Locale.ENGLISH); - TestMail mail = getMailReceiver().receive(furtherEmail); + new EmailAddress(u, furtherEmail, Locale.ENGLISH); + getMailReceiver().receive(furtherEmail); try (GigiPreparedStatement stmt = new GigiPreparedStatement("UPDATE `emailPinglog` SET `status`='success'::`pingState`, `when` = (now() - interval '1 months' * ?::INTEGER) WHERE `email`=? ")) { stmt.setInt(1, TimeConditions.getInstance().getEmailPingMonths()); stmt.setString(2, furtherEmail);