]> WPIA git - gigi.git/commitdiff
upd: more verbose success message after verification
authorFelix Dörre <felix@dogcraft.de>
Tue, 15 Aug 2017 19:37:13 +0000 (21:37 +0200)
committerFelix Dörre <felix@dogcraft.de>
Tue, 15 Aug 2017 19:40:37 +0000 (21:40 +0200)
Change-Id: Id6ab26cebe97bc140a326a58ddfbcf1ccd446dcf

src/club/wpia/gigi/pages/wot/VerificationForm.java
tests/club/wpia/gigi/pages/wot/TestVerification.java

index 6a785c0ce8f714a3f610b9c817617dd0113e02b6..77f2be093c4cf34e3338b90580544237479888ac 100644 (file)
@@ -217,7 +217,8 @@ public class VerificationForm extends Form {
         }
 
         Notary.verifyAll(agent, applicant, dob, pointsI, location, req.getParameter("date"), type, toVerify.toArray(new Name[toVerify.size()]), cs.getCountry());
-        Outputable result = new TranslateCommand("Verification complete.");
+
+        Outputable result = SprintfCommand.createSimple("Verification of user with email address {0} and {1} verification points complete.", applicant.getEmail(), points);
         if (isWithPasswordReset()) {
             Language langApplicant = Language.getInstance(applicant.getPreferredLocale());
             String method = langApplicant.getTranslation("A password reset was triggered. If you did a password reset by verification, please enter your secret password using this form:");
index ef37f5980b518ba607be58bec097b744164900d9..7a6aed4ea4770fdb9a30e7dd1516c21a844c337e 100644 (file)
@@ -98,7 +98,9 @@ public class TestVerification extends ManagedTest {
 
     @Test
     public void testVerifyForm() throws IOException {
-        executeSuccess("date=" + validVerificationDateString() + "&location=testcase&countryCode=DE&certify=1&rules=1&assertion=1&points=10");
+        String body = executeSuccess("date=" + validVerificationDateString() + "&location=testcase&countryCode=DE&certify=1&rules=1&assertion=1&points=10");
+        assertThat(body, containsString("10"));
+        assertThat(body, containsString(applicantM));
     }
 
     @Test
@@ -259,9 +261,10 @@ public class TestVerification extends ManagedTest {
 
     }
 
-    private void executeSuccess(String query) throws MalformedURLException, IOException {
-        assertThat(execute(query), hasNoError());
-
+    private String executeSuccess(String query) throws MalformedURLException, IOException {
+        String response = execute(query);
+        assertThat(response, hasNoError());
+        return response;
     }
 
     private String execute(String query) throws MalformedURLException, IOException {