0
votes

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

1

1 Answers

1
votes

Try something like this :

 MyController controller = new MyController()
 def model = controller.showBookDetails()
 assert model.author == 'Alvin Plantinga'