-
-
Notifications
You must be signed in to change notification settings - Fork 968
Closed
Milestone
Description
By default the UrlMappingsUnitTestMixin does not perform a check against the type of exception inside UrlMappings.groovy. We currently sub-class UrlMappingsUnitTestMixin to test this feature, but I'd like to document its absence here.
Task List
- Steps to reproduce provided
- Stacktrace (if present) provided
- Example that reproduces the problem uploaded to Github
- Full description of the issue provided (see below)
Steps to Reproduce
- Create an entry in UrlMappings.groovy mapping different actions for the '500' location based on the exception thrown
- Create unit test that uses the UrlMappingsTestMixin to test using assertForwardUrlMapping
- Observe the test failure
Expected Behaviour
assertForwardUrlMapping will test the exception mapping in UrlMappings.groovy
Actual Behaviour
assertForwardUrlMapping only tests the action/controller, ignoring the exception.
Environment Information
- Operating System: Ubuntu MATE 16.10
- Grails Version: 3.1.12
- JDK Version: OpenJDK 64-Bit Server VM (build 25.102-b14, mixed mode)
Example Application
https://github.com/joemccall86/url-mappings-mixin-test
Other Notes
We have the workaround code already, and I'm putting together a PR to address this issue right now.
Metadata
Metadata
Assignees
Labels
No labels