-
Notifications
You must be signed in to change notification settings - Fork 6
Open
@neemo26
Description
@test
public void testCreate() throws Exception {
assertEquals(_u.getId(), 0L);
authService.create(_u, _u.getPassword());
assertTrue(_u.getId() > 0L);
}
@Test
public void testResetPassword() throws Exception {
AuthorizedUser user = authService.find(id);
if (user.isBlocked()) {
return;
}
String newPwd = "_newpwd";
// all the string params password are plain text.
authService.resetPassword(user, newPwd, newPwd, null);
AuthorizedUser u = authService.login(user.getAccount(), newPwd, null);
assertNotNull(u);
}
@Test
public void testUpdate() throws Exception {
AuthorizedUser user = authService.find(id);
String newContact = "10086";
user.setContact(newContact);
authService.update(user, "123456");
assertEquals(newContact, authService.find(id).getContact());
}
Metadata
Metadata
Assignees
Labels
No labels