Skip to content

Commit

Permalink
add find company endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
Shuiei committed Apr 8, 2021
1 parent 2a1806c commit 83e67e1
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/lightspeed_restaurant/company.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

module LightspeedRestaurantClient
class Company < LightspeedRestaurantClient::Base
extend Operations::Find
extend Operations::List

def self.resource_name
Expand Down
42 changes: 42 additions & 0 deletions spec/fixtures/vcr_cassettes/company/find.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions spec/lightspeed_restaurant/company_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,16 @@ module LightspeedRestaurantClient
let(:results_count) { 1 }
end
end

context 'when finding' do
it_behaves_like 'a find operation' do
let(:resource_id) { 14160 }

it 'returns the company datas' do
result = described_class.find(resource_id)
expect(result.id).to eq 14160
end
end
end
end
end

0 comments on commit 83e67e1

Please sign in to comment.