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.localisation.Language;
import club.wpia.gigi.pages.account.MyDetails;
import club.wpia.gigi.pages.admin.support.SupportUserDetailsPage;
import club.wpia.gigi.testUtils.IOUtils;
import club.wpia.gigi.testUtils.SEClientTest;
import club.wpia.gigi.testUtils.TestEmailReceiver.TestMail;
import club.wpia.gigi.testUtils.IOUtils;
import club.wpia.gigi.testUtils.SEClientTest;
import club.wpia.gigi.testUtils.TestEmailReceiver.TestMail;
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."));
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."));
// supporter removes supporter flag
URLConnection uc = post(SupportUserDetailsPage.PATH + u.getId() + "/", "removeGroup&groupToModify=" + URLEncoder.encode(Group.SUPPORTER.getDBName(), "UTF-8"));
// supporter removes supporter flag
URLConnection uc = post(SupportUserDetailsPage.PATH + u.getId() + "/", "removeGroup&groupToModify=" + URLEncoder.encode(Group.SUPPORTER.getDBName(), "UTF-8"));
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
Group.SUPPORTER.getName().output(pw, Language.getInstance(Locale.ENGLISH), new HashMap<String, Object>());
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
Group.SUPPORTER.getName().output(pw, Language.getInstance(Locale.ENGLISH), new HashMap<String, Object>());