Commits

plightbo  committed 1013ac8

tests pass, but this IS ugly. must come back to fix

git-svn-id: http://svn.opensymphony.com/svn/webwork/trunk@264573baa09-0c28-0410-bef9-dab3c582ae83

  • Participants
  • Parent commits 7a7c9af

Comments (0)

Files changed (2)

File src/test/com/opensymphony/webwork/dispatcher/ServletDispatcherResultTest.java

         Mock requestMock = new Mock(HttpServletRequest.class);
         requestMock.expectAndReturn("getAttribute", "javax.servlet.include.servlet_path", null);
         requestMock.expectAndReturn("getRequestDispatcher", C.args(C.eq("foo.jsp")), dispatcherMock.proxy());
+        requestMock.expect("setAttribute", C.ANY_ARGS); // this is a bad mock, but it works
+        requestMock.expect("setAttribute", C.ANY_ARGS); // this is a bad mock, but it works
+        requestMock.matchAndReturn("getRequestURI", "foo.jsp");
 
         Mock responseMock = new Mock(HttpServletResponse.class);
         responseMock.expectAndReturn("isCommitted", Boolean.FALSE);

File src/test/com/opensymphony/webwork/views/jsp/URLTagTest.java

     }
 
     public void testAddParameters() {
-        jspWriter.setExpectedData("TestAction.action?param2=value2&param1=value1");
+        request.setAttribute("webwork.request_uri", "/Test.action");
+
+        jspWriter.setExpectedData("/TestAction.action?param2=value2&param1=value1");
         request.setAttribute("webwork.request_uri", "/TestAction.action");
         request.setQueryString("TestAction.action");
-        request.setRequestURI("TestAction.action");
 
         try {
             tag.doStartTag();