Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
include_context 'api session'
let(:path) { "/api/v1/#{order_id}/contact_info" }
let(:order_id) { 456 }
it_behaves_like 'protected endpoint', :get
context 'when order found' do
let(:order) { FactoryBot.create(:order, creator: user) }
let(:order_id) { order.id }
it 'renders correct response' do
get path, valid_params, valid_headers
# expectations
end
end
context 'when order not found' do
it 'renders correct response' do
get path, valid_params, valid_headers
# expectations
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment