use of org.mamute.model.User in project mamute by caelum.
the class UserPersonalInfoValidatorTest method should_validate_user_trying_to_update_name_after_allowed_time.
@Test
public void should_validate_user_trying_to_update_name_after_allowed_time() {
User artur = user("artur com seis caracteres", validEmail);
DateTimeUtils.setCurrentMillisFixed(new DateTime().plusDays(31).getMillis());
UserPersonalInfo info = new UserPersonalInfo(artur).withName(fromTrustedText("newName")).withEmail(artur.getEmail());
when(bundle.getMessage("date.joda.simple.pattern")).thenReturn("dd/MM/YYYY");
assertTrue(infoValidator.validate(info));
}
use of org.mamute.model.User in project mamute by caelum.
the class RetrieveKarmaTest method setUp.
@Before
public void setUp() {
User moderator = user(null, null).asModerator();
User user = user(null, null);
retrieveKarma = new RetrieveKarma(new LoggedUser(moderator, null), null, null);
retrieveKarmaWithoutModerator = new RetrieveKarma(new LoggedUser(user, null), null, null);
question = question(null);
}
Aggregations