use of org.activityinfo.server.login.model.ConfirmInvitePageModel in project activityinfo by bedatadriven.
the class ConfirmInviteControllerTest method emptyPasswordShouldNotBeAccepted.
@Test
public void emptyPasswordShouldNotBeAccepted() throws Exception {
Response response = resource.confirm(RestMockUtils.mockUriInfo("http://www.activityinfo.org/confirm"), VALID_KEY, "fr", null, "Alex Bertram", false);
Viewable viewable = (Viewable) response.getEntity();
assertThat(viewable.getModel(), instanceOf(ConfirmInvitePageModel.class));
ConfirmInvitePageModel model = (ConfirmInvitePageModel) viewable.getModel();
assertTrue("error message set", model.isFormIncomplete());
}
use of org.activityinfo.server.login.model.ConfirmInvitePageModel in project activityinfo by bedatadriven.
the class ConfirmInviteViewTest method templateProcesses.
@Test
public void templateProcesses() {
User user = new User();
user.setName("Alex");
user.setEmail("alex@bertram");
user.setChangePasswordKey("ABC12345");
user.setLocale("en");
assertProcessable(new ConfirmInvitePageModel(user));
}
Aggregations