Skip to content

Instantly share code, notes, and snippets.

@andriy-baran
Last active June 27, 2018 08:51
Show Gist options
  • Save andriy-baran/98308b8225ad8b6eb02078f43a657cd8 to your computer and use it in GitHub Desktop.
Save andriy-baran/98308b8225ad8b6eb02078f43a657cd8 to your computer and use it in GitHub Desktop.
it 'renders correct response' do
get path, valid_params, valid_headers # do request
expect(response).to have_http_status(:ok) #
expect(response.content_type).to eq 'application/json' # Assert status, mime type and response body
expect(response_object).to have_attributes(valid_response) #
item.reload
expect(item.qc_by).to eq nil #
expect(item.qc_signed_by).to eq nil # Check database state
expect(item.in_qc_at).to eq nil #
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment