bug#1056920: added another unit test to ensure that directly requesting the login...
authormaxcooper <maxcooper>
Wed, 15 Feb 2006 08:34:14 +0000 (08:34 +0000)
committermaxcooper <maxcooper>
Wed, 15 Feb 2006 08:34:14 +0000 (08:34 +0000)
src/test/org/securityfilter/test/http/form/NoSessionForUnsecuredTest.java
web/catalina-example/loginForm.jsp
web/example/loginForm.jsp
web/flexible-example/loginForm.jsp
web/rememberme/loginForm.jsp

index 91028c8..8f3e888 100644 (file)
@@ -93,4 +93,18 @@ public class NoSessionForUnsecuredTest extends TestBase {
       String[] cookieNames = response.getNewCookieNames();
       assertEquals("Number of cookies should be 0.", 0, cookieNames.length);
    }
+
+   /**
+    * Test for session cookie on index page. There should be no session cookie.
+    * 
+    * @throws Exception
+    */
+   public void testNoSessionForLoginPage() throws Exception {
+      
+      WebRequest request = new GetMethodWebRequest(baseUrl + "/loginForm.jsp");
+      WebResponse response = session.getResponse(request);
+      
+      String[] cookieNames = response.getNewCookieNames();
+      assertEquals("Number of cookies should be 0.", 0, cookieNames.length);
+   }
 }
index 34d37c4..bdb92f0 100644 (file)
@@ -1,3 +1,4 @@
+<%@ page session="false" %>
 <%@ page import="org.securityfilter.example.Constants"%>
 
 <html>
index 34d37c4..bdb92f0 100644 (file)
@@ -1,3 +1,4 @@
+<%@ page session="false" %>
 <%@ page import="org.securityfilter.example.Constants"%>
 
 <html>
index c04f078..41de56d 100644 (file)
@@ -1,3 +1,4 @@
+<%@ page session="false" %>
 <%@ page import="org.securityfilter.example.Constants"%>\r
 \r
 <html>\r
index 19e6889..2228026 100644 (file)
@@ -1,3 +1,4 @@
+<%@ page session="false" %>
 <%@ page import="org.securityfilter.example.Constants"%>
 
 <html>