I am writing a grails 5 app with a `User` class. I...
# questions
p
I am writing a grails 5 app with a
User
class. I've used
./grailsw generate-controller User
to generate a controller, service, and corresponding specs. I've assigned valid values to the
populateValidParams
method in the
UserControllerSpec
. However, I have four failing tests in
UserControllerSpec
.
Copy code
UserControllerSpec > Test the index action returns the correct response FAILED
    org.spockframework.runtime.SpockComparisonFailure at UserControllerSpec.groovy:45

UserControllerSpec > Test the save action correctly persists FAILED
    org.spockframework.runtime.ConditionFailedWithExceptionError at UserControllerSpec.groovy:75
        Caused by: org.grails.web.converters.exceptions.ConverterException at UserControllerSpec.groovy:75
            Caused by: org.grails.web.json.JSONException at UserControllerSpec.groovy:75

UserControllerSpec > Test the show action with a valid id FAILED
    org.spockframework.runtime.ConditionFailedWithExceptionError at UserControllerSpec.groovy:123
        Caused by: org.grails.web.converters.exceptions.ConverterException at UserControllerSpec.groovy:123
            Caused by: org.grails.web.json.JSONException at UserControllerSpec.groovy:123

UserControllerSpec > Test the update action correctly persists FAILED
    org.spockframework.runtime.ConditionFailedWithExceptionError at UserControllerSpec.groovy:154
        Caused by: org.grails.web.converters.exceptions.ConverterException at UserControllerSpec.groovy:154
            Caused by: org.grails.web.json.JSONException at UserControllerSpec.groovy:154