Testing the rails-api