Skip to content

Instantly share code, notes, and snippets.

@jsmestad
Created September 10, 2014 17:51
Show Gist options
  • Save jsmestad/b3cb02c9ace509861ca0 to your computer and use it in GitHub Desktop.
Save jsmestad/b3cb02c9ace509861ca0 to your computer and use it in GitHub Desktop.
require 'rails_helper'
RSpec.describe 'Domains Requests' do
describe 'GET /api/domains/{id}' do
it 'responds with the requested domain' do
domain = FactoryGirl.create(:domain)
get api_domain_path(domain)
expect(response).to have_http_status(200)
end
end
end
@jsmestad
Copy link
Author

Processing by Api::DomainsController#show as HTML
  Parameters: {"id"=>"1"}
  Domain Load (0.2ms)  SELECT  "domains".* FROM "domains"  WHERE "domains"."id" IN (1) LIMIT 10 OFFSET 0
   (0.1ms)  SELECT "records"."id" FROM "records"  WHERE "records"."domain_id" = ?  [["domain_id", 1]]
   (0.1ms)  SELECT COUNT(*) FROM "domains"  WHERE "domains"."id" IN (1)
Completed 200 OK in 20ms (Views: 0.3ms | ActiveRecord: 0.5ms)
   (0.3ms)  rollback transaction

@jsmestad
Copy link
Author

response.status # => nil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment