Skip to content

Commit

Permalink
Merge pull request #30 from chronogolf/add_get_comopany
Browse files Browse the repository at this point in the history
add find company endpoints
  • Loading branch information
Shuiei authored Apr 8, 2021
2 parents 2a1806c + ab53a5f commit 5b09d57
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's data" do
result = described_class.find(resource_id)
expect(result.id).to eq 14160
end
end
end
end
end

0 comments on commit 5b09d57

Please sign in to comment.