1.1 --- a/freemarkerdor/src/test/java/cz/xelfi/quoridor/freemarkerdor/UITest.java Sun Aug 30 14:56:32 2009 +0200
1.2 +++ b/freemarkerdor/src/test/java/cz/xelfi/quoridor/freemarkerdor/UITest.java Sun Aug 30 15:19:24 2009 +0200
1.3 @@ -33,6 +33,7 @@
1.4 import java.io.IOException;
1.5 import java.net.URI;
1.6 import java.util.concurrent.Callable;
1.7 +import javax.ws.rs.core.Cookie;
1.8 import org.junit.After;
1.9 import org.junit.Before;
1.10 import org.junit.Test;
1.11 @@ -97,6 +98,16 @@
1.12 if (res.indexOf("Quoridor") == -1) {
1.13 fail("Wrong index.html:\n" + res);
1.14 }
1.15 + if (res.indexOf("Login") == -1) {
1.16 + fail("Wrong index.html:\n" + res);
1.17 + }
1.18 + if (res.indexOf("action=\"login\"") == -1) {
1.19 + fail("Wrong index.html:\n" + res);
1.20 + }
1.21 + res = webResource.cookie(Cookie.valueOf("login=jarda")).accept("text/html").get(String.class);
1.22 + if (res.indexOf("action=\"games/create\"") == -1) {
1.23 + fail(res);
1.24 + }
1.25 }
1.26
1.27 }