Testing responding with JSON and using a directive to show that data