You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When unit testing a controller using grails 4.0.4 and 4.0.5, the result of a controller that renders a gson view shows up in the response object.
That is no longer the case for versions 4.0.6 through 4.0.10.
The unit testing framework also has different behavior of how the model object is populated in a unit test.
In grails 4.0.4 and 4.0.5, the model object is not filled out when the controller action uses "respond".
in grails 4.0.10, the model object is populated.
I think that grails 4.0.4 has an issue where the model object is populated incorrectly, and that grails 4.0.10 has an issue where the gson view isn't rendered properly. (and maybe these are related).
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)
@puneetbehl --the unit tests I describe are running, the result data just isn't getting set properly.
Any chance you marked this "relates to" on the wrong ticket?
When unit testing a controller using grails 4.0.4 and 4.0.5, the result of a controller that renders a gson view shows up in the response object.
That is no longer the case for versions 4.0.6 through 4.0.10.
The unit testing framework also has different behavior of how the model object is populated in a unit test.
In grails 4.0.4 and 4.0.5, the model object is not filled out when the controller action uses "respond".
in grails 4.0.10, the model object is populated.
I think that grails 4.0.4 has an issue where the model object is populated incorrectly, and that grails 4.0.10 has an issue where the gson view isn't rendered properly. (and maybe these are related).
Task List
Steps to Reproduce
Expected Behaviour
That both the
response.json
(andresponse.text
) get populated, as well as themodel
variable.Actual Behaviour
response.text
andresponse.json
don't get populated for grails 4.0.10.model
doesn't get populated in grails 4.0.4.Environment Information
Example Application
[email protected]:tircnf/gsonTesting.git
This example application has two branches. the "main" branch is grails 4.0.4 and contains 6 unit tests.
3 that pass and 3 that fail.
The "grails4010" branch was upgraded to grails 4.0.10. Running the tests on that branch cause the failing tests to pass and the passing tests to fail.
The text was updated successfully, but these errors were encountered: