i am having the following problem: i want to test the logout action of my controller. before that i am calling the login method of my controller which both redirect to the same page. now I am getting the following error message:
groovy.grails.web.servlet.mvc.exceptions.CannotRedirectException: Cannot issue a redirect(..) here. A previous call to redirect(..) has already redirected the response.
i 确实理解这一问题,但所有建议的解决办法(回顾重整方法;叫GrailsWebUtil.bindMockWebRequest())都没有奏效。
i am doing integration testing and using the class ControllerUnitTestCase.
any suggestions? thanks dominik