Reputation: 41
I want to write an integration test, that tests the response of a controller, that only returns a map. Normally for unit tests, this is done as follows
def model = controller.showBookDetails()
assert model.author == 'Alvin Plantinga'
In the integration test this does not work for me. Is there another method?
Greetings
Upvotes: 0
Views: 48
Reputation: 5538
Try something like this :
MyController controller = new MyController()
def model = controller.showBookDetails()
assert model.author == 'Alvin Plantinga'
Upvotes: 1