What is the preferred way to test JSON response, especially the attributes and values to be present in ? What is the right type of a controller to extend from: IntegrationSpec
, ControllerSpec
, AppIntegrationSpec
? I didn't find the proper response in the corresponding Testing section. Thank you.
ActiveWeb: testing JSON response attributes and values
58 views Asked by belgoros At
1
There is a good example if this in this sample project: https://github.com/javalite/activeweb-rest/blob/27687e26f5476734b867d01f38b2575c6de3f3c9/src/test/java/app/controllers/PeopleControllerSpec.java#L57
Basically, you get a
responseContent()
as String, then you can do whatever you want with it. The super class for the spec is irrelevant.