X-Git-Url: https://code.wpia.club/?p=gigi.git;a=blobdiff_plain;f=tests%2Fclub%2Fwpia%2Fgigi%2Fpages%2Fadmin%2FTestSEAdminNotificationMail.java;h=a84e0e2f7c0cbaddecf5c383eab4a8e04e9c86b7;hp=180455cec7a93ec7e2fa4c79da3ff3f1f643ecc2;hb=eebeeee1e9fa524482d5f0029d7a70ce9aedd5e8;hpb=69db7a1c8242003bde28e9d8c0be20ea3aa5c693 diff --git a/tests/club/wpia/gigi/pages/admin/TestSEAdminNotificationMail.java b/tests/club/wpia/gigi/pages/admin/TestSEAdminNotificationMail.java index 180455ce..a84e0e2f 100644 --- a/tests/club/wpia/gigi/pages/admin/TestSEAdminNotificationMail.java +++ b/tests/club/wpia/gigi/pages/admin/TestSEAdminNotificationMail.java @@ -12,6 +12,7 @@ import java.net.URLEncoder; import java.util.HashMap; import java.util.Locale; +import org.hamcrest.CoreMatchers; import org.junit.Test; import club.wpia.gigi.GigiApiException; @@ -20,6 +21,7 @@ import club.wpia.gigi.dbObjects.User; import club.wpia.gigi.localisation.Language; import club.wpia.gigi.pages.account.MyDetails; import club.wpia.gigi.pages.admin.support.SupportUserDetailsPage; +import club.wpia.gigi.testUtils.ArrayContains; import club.wpia.gigi.testUtils.IOUtils; import club.wpia.gigi.testUtils.SEClientTest; import club.wpia.gigi.testUtils.TestEmailReceiver.TestMail; @@ -59,6 +61,10 @@ public class TestSEAdminNotificationMail extends SEClientTest { getMailReceiver().receive(targetEmail); TestMail tm = getMailReceiver().receive(ServerConstants.getSupportMailAddress()); assertThat(tm.getMessage(), containsString("A password reset was triggered and an email was sent to user.")); + + User test = User.getById(targetID); + String[] result = test.getAdminLog(); + assertThat(result, ArrayContains.contains(CoreMatchers.equalTo("SE triggered password reset (a20140808.8)"))); } @Test