Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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