]> WPIA git - gigi.git/blob - tests/org/cacert/gigi/LoginTest.java
Format code according do BenBE's formatter.
[gigi.git] / tests / org / cacert / gigi / LoginTest.java
1 package org.cacert.gigi;
2
3 import java.io.IOException;
4 import static org.junit.Assert.*;
5 import org.cacert.gigi.testUtils.ManagedTest;
6 import org.junit.Test;
7
8 public class LoginTest extends ManagedTest {
9
10     @Test
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);
15         waitForMail();
16         assertFalse(isLoggedin(login(email, TEST_PASSWORD)));
17     }
18
19     @Test
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)));
25     }
26
27 }