Add json_response helper to ActionController::TestCase
Get host id from object instead of column
Move Devise mappings to base test case
Prefer &&/|| over and/or

https://github.com/bbatsov/ruby-style-guide
Add API methods for getting and updating a match