1 package org.cacert.gigi;
3 import java.io.IOException;
4 import static org.junit.Assert.*;
5 import org.cacert.gigi.testUtils.ManagedTest;
8 public class LoginTest extends ManagedTest {
11 public void testLoginUnverified() throws IOException {
12 long uniq = System.currentTimeMillis();
13 String email = "system" + uniq + "@testmail.org";
14 registerUser("an", "bn", email, TEST_PASSWORD);
16 assertFalse(isLoggedin(login(email, TEST_PASSWORD)));
20 public void testLoginVerified() throws IOException {
21 long uniq = System.currentTimeMillis();
22 String email = "system2" + uniq + "@testmail.org";
23 createVerifiedUser("an", "bn", email, TEST_PASSWORD);
24 assertTrue(isLoggedin(login(email, TEST_PASSWORD)));