Last active
May 9, 2018 14:02
-
-
Save andriy-baran/19149471ebadd3a16d56c54f6e196c56 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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