X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=tests%2Forg%2Fcacert%2Fgigi%2Fpages%2Faccount%2FTestContactInformation.java;fp=tests%2Forg%2Fcacert%2Fgigi%2Fpages%2Faccount%2FTestContactInformation.java;h=0000000000000000000000000000000000000000;hb=49d8f1404d62a69e552c12e61d78a33c6f903e20;hp=c63e36d2b3d76866e521fdd7ce305ef111555cd1;hpb=7c4d8d1effca280cbb6ac0cc8add1157e484e76b;p=gigi.git diff --git a/tests/org/cacert/gigi/pages/account/TestContactInformation.java b/tests/org/cacert/gigi/pages/account/TestContactInformation.java deleted file mode 100644 index c63e36d2..00000000 --- a/tests/org/cacert/gigi/pages/account/TestContactInformation.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.cacert.gigi.pages.account; - -import static org.hamcrest.CoreMatchers.*; -import static org.junit.Assert.*; - -import java.io.IOException; -import java.net.URL; -import java.net.URLConnection; - -import org.cacert.gigi.testUtils.ClientTest; -import org.cacert.gigi.testUtils.IOUtils; -import org.junit.Test; - -public class TestContactInformation extends ClientTest { - - @Test - public void testDirectoryListingToggle() throws IOException { - assertNull(executeBasicWebInteraction(cookie, MyDetails.PATH, "listme=1&contactinfo=&processContact", 1)); - URLConnection url = new URL("https://" + getServerName() + MyDetails.PATH).openConnection(); - url.setRequestProperty("Cookie", cookie); - String res = IOUtils.readURL(url); - res = res.split(java.util.regex.Pattern.quote(""))[1]; - assertThat(res, containsString("value=\"1\" selected")); - assertNull(executeBasicWebInteraction(cookie, MyDetails.PATH, "listme=0&contactinfo=&processContact", 1)); - url = new URL("https://" + getServerName() + MyDetails.PATH).openConnection(); - url.setRequestProperty("Cookie", cookie); - res = IOUtils.readURL(url); - res = res.split(java.util.regex.Pattern.quote(""))[1]; - assertTrue(res.contains("value=\"0\" selected")); - } - - @Test - public void testContactinfoSet() throws IOException { - String text = createUniqueName(); - assertNull(executeBasicWebInteraction(cookie, MyDetails.PATH, "listme=1&contactinfo=" + text + "&processContact", 1)); - URLConnection url = new URL("https://" + getServerName() + MyDetails.PATH).openConnection(); - url.setRequestProperty("Cookie", cookie); - String res = IOUtils.readURL(url); - res = res.split(java.util.regex.Pattern.quote(""))[1]; - assertThat(res, containsString(text)); - } -}