- String run = runRegister("fname=fn" + uniq + "&lname=ln" + uniq + "&email=ma" + uniq + "@cacert.org&pword1=pas" + uniq + "&pword2=pas2" + uniq + "&day=1&month=1&year=0");
- assertTrue(run.contains("fn" + uniq));
- assertTrue(run.contains("ln" + uniq));
- assertTrue(run.contains("ma" + uniq + "@cacert.org"));
- assertTrue( !run.contains("pas" + uniq));
- assertTrue( !run.contains("pas2" + uniq));
-
+ String run = runRegister("fname=fn" + uniq + "&lname=ln" + uniq + "&email=ma" + uniq + "@cacert.org&pword1=pas" + uniq + "&pword2=pas2" + uniq + "&day=28&month=10&year=1950");
+ assertThat(run, containsString("fn" + uniq));
+ assertThat(run, containsString("ln" + uniq));
+ assertThat(run, containsString("ma" + uniq + "@cacert.org"));
+ assertThat(run, not(containsString("pas" + uniq)));
+ assertThat(run, not(containsString("pas2" + uniq)));
+ // test year
+ assertThat(run, containsString("name=\"year\" value=\"1950\""));
+ // test month
+ assertThat(run, containsString("<option value='10' selected=\"selected\">O"));
+ // test day
+ assertThat(run, containsString("<option selected=\"selected\">28</option>"));