From 8d28268059908bd18e543da7cec6f2ac320f90cf Mon Sep 17 00:00:00 2001 From: Julien Iguchi-Cartigny Date: Wed, 29 Jan 2014 11:32:36 +0100 Subject: [PATCH] fixing tests with servlet path --- src/test/java/fr/plil/sio/web/mvc/CheckUserInterceptorTest.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/test/java/fr/plil/sio/web/mvc/CheckUserInterceptorTest.java b/src/test/java/fr/plil/sio/web/mvc/CheckUserInterceptorTest.java index 494f6ea..9f7b8bf 100644 --- a/src/test/java/fr/plil/sio/web/mvc/CheckUserInterceptorTest.java +++ b/src/test/java/fr/plil/sio/web/mvc/CheckUserInterceptorTest.java @@ -22,25 +22,24 @@ public class CheckUserInterceptorTest { request = new MockHttpServletRequest(); response = new MockHttpServletResponse(); } -/* + @Test public void checkPreHandleServletPathIsLogin() throws IOException { - request.setPathInfo("/login"); + request.setServletPath("/login"); assertTrue(interceptor.preHandle(request, response, null)); } @Test public void checkPreHandleUsernameInSession() throws IOException { userSession.setUsername("admin"); - request.setPathInfo("/blabla"); + request.setServletPath("/blabla"); assertTrue(interceptor.preHandle(request, response, null)); } @Test public void checkPreHandleUsernameNotInSession() throws IOException { - request.setPathInfo("/blabla"); + request.setServletPath("/blabla"); assertFalse(interceptor.preHandle(request, response, null)); assertEquals(response.getRedirectedUrl(),"login"); } - */ } -- libgit2 0.21.2