Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 2.0-M1
-
Fix Version/s: None
-
Component/s: Testing
-
Labels:None
Description
redirectArgs is no longer available in controller unit tests for Grails 2.0. Instead response.redirectedUrl seems to be the way forward (that's all that is mentioned in the docs). However this means that the test is necessarily also testing the UrlMappings as well as the controller. Personally I would like to see the return of redirectArgs and consider it a bug that it has gone away - though clearly whether it's a bug or an improvement is open to interpretation. It will break existing tests and make them harder and more confusing to fix when people move to 2.0, which I think is good reason to get it working again.
Issue Links
- relates to
-
GRAILS-7617
TestFor(ControllerClass) annotation doesn't provide renderArgs
-
It would also be useful to have forwardArgs available again. You can use response.forwardedUrl, but the format is a bit strange - something like /grails/<controllerName>/<actionName>.dispatch?id=<id>.