import java.net.URLEncoder;
import org.cacert.gigi.dbObjects.Group;
-import org.cacert.gigi.pages.admin.support.FindUserPage;
+import org.cacert.gigi.pages.admin.support.FindUserByEmailPage;
import org.cacert.gigi.pages.admin.support.SupportEnterTicketPage;
import org.cacert.gigi.pages.admin.support.SupportUserDetailsPage;
import org.cacert.gigi.testUtils.ClientTest;
String mail = createUniqueName() + "@example.com";
int id = createVerifiedUser("Först", "Secönd", mail, TEST_PASSWORD);
- URLConnection uc = post(cookie, FindUserPage.PATH, "process&email=" + URLEncoder.encode(mail, "UTF-8"), 0);
+ URLConnection uc = post(cookie, FindUserByEmailPage.PATH, "process&email=" + URLEncoder.encode(mail, "UTF-8"), 0);
assertEquals("https://" + ServerConstants.getWwwHostNamePortSecure() + SupportUserDetailsPage.PATH + id, uc.getHeaderField("Location"));
}
String mail = createUniqueName() + "@example.tld";
int id = createVerifiedUser("Först", "Secönd", mail, TEST_PASSWORD);
- URLConnection uc = post(cookie, FindUserPage.PATH, "process&email=" + URLEncoder.encode("%@example.tld", "UTF-8"), 0);
+ URLConnection uc = post(cookie, FindUserByEmailPage.PATH, "process&email=" + URLEncoder.encode("%@example.tld", "UTF-8"), 0);
assertEquals("https://" + ServerConstants.getWwwHostNamePortSecure() + SupportUserDetailsPage.PATH + id, uc.getHeaderField("Location"));
}
int id = createVerifiedUser("Först", "Secönd", mail, TEST_PASSWORD);
String mail2 = createUniqueName() + "@example.org";
int id2 = createVerifiedUser("Först", "Secönd", mail2, TEST_PASSWORD);
- URLConnection uc = post(cookie, FindUserPage.PATH, "process&email=" + URLEncoder.encode("%@example.org", "UTF-8"), 0);
+ URLConnection uc = post(cookie, FindUserByEmailPage.PATH, "process&email=" + URLEncoder.encode("%@example.org", "UTF-8"), 0);
String res = IOUtils.readURL(uc);
assertThat(res, containsString(SupportUserDetailsPage.PATH + id));
String mail2 = createUniqueName() + "@fxample.org";
int id2 = createVerifiedUser("Först", "Secönd", mail2, TEST_PASSWORD);
- URLConnection uc = post(cookie, FindUserPage.PATH, "process&email=" + URLEncoder.encode("%@_xample.org", "UTF-8"), 0);
+ URLConnection uc = post(cookie, FindUserByEmailPage.PATH, "process&email=" + URLEncoder.encode("%@_xample.org", "UTF-8"), 0);
String res = IOUtils.readURL(uc);
assertThat(res, containsString(SupportUserDetailsPage.PATH + id));
@Test
public void testWildcardMailSearchNoRes() throws MalformedURLException, UnsupportedEncodingException, IOException {
- URLConnection uc = post(FindUserPage.PATH, "process&email=" + URLEncoder.encode("%@_humpfelkumpf.org", "UTF-8"));
+ URLConnection uc = post(FindUserByEmailPage.PATH, "process&email=" + URLEncoder.encode("%@_humpfelkumpf.org", "UTF-8"));
assertNotNull(fetchStartErrorMessage(IOUtils.readURL(uc)));
}
@Test
public void testFulltextMailSearchNoRes() throws MalformedURLException, UnsupportedEncodingException, IOException {
- URLConnection uc = post(cookie, FindUserPage.PATH, "process&email=" + URLEncoder.encode(createUniqueName() + "@example.org", "UTF-8"), 0);
+ URLConnection uc = post(cookie, FindUserByEmailPage.PATH, "process&email=" + URLEncoder.encode(createUniqueName() + "@example.org", "UTF-8"), 0);
assertNotNull(fetchStartErrorMessage(IOUtils.readURL(uc)));
}