Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.5.7
-
None
Description
I have a page which always redirects.
When I write a test for this page, tester.assertRedirectUrl(...) always fails with the assertion failure showing that the redirect URL was null.
The page does redirect when running the application for real and I have stepped through in the debugger when running the test and it goes all the way to the HttpServletResponse.sendRedirect call.
However, in the same debugging session, tester.getLastResponse().getRedirectLocation() == null
Cut-down example follows.
public class AlwaysRedirectPage extends WebPage
{
public AlwaysRedirectPage()
}
public class TestAlwaysRedirectPage
{
@Test
public void test()
}