Merge pull request #555 from stianst/master

Added test to make sure password is verified with totp login
This commit is contained in:
Stian Thorgersen 2014-07-24 14:15:34 +01:00
commit 245d83adce

View file

@ -128,4 +128,19 @@ public class LoginTotpTest {
events.expectLogin().assertEvent(); events.expectLogin().assertEvent();
} }
@Test
public void loginWithTotpInvalidPassword() throws Exception {
loginPage.open();
loginPage.login("test-user@localhost", "invalid");
loginTotpPage.assertCurrent();
loginTotpPage.login(totp.generate("totpSecret"));
loginPage.assertCurrent();
Assert.assertEquals("Invalid username or password.", loginPage.getError());
events.expectLogin().error("invalid_user_credentials").removeDetail(Details.CODE_ID).session((String) null).assertEvent();
}
} }