We could get rid of this expectation and instead assert that the response contains `foo`. This would additionally test that the return value of `as_json` is passed to the controller's response.