use rack-test instead of capybara because this is an api and Jonas says: Do not test APIs with Capybara. It wasn’t designed for it.