Let's say I want to test a controller that gets some value from a service and then pass some of all of those values to the view.

Do you test that the view gets the result that the controller took from the service, without taking care of seeing the exact variables being passed, or do you test specifically for the variables that you need on the view?

So if in the view you have var 'foo' and 'foo2', you can test that the controller is simply passing the info it gets from the service, or you can test that the variables being passed are effectively called 'foo' and 'foo2'.

What approach do you use?

Related posts

Recent Viewed