Skip to content

Commit

Permalink
Merge pull request #235 from sahild/master
Browse files Browse the repository at this point in the history
Build Fix
  • Loading branch information
ryanatwork authored Aug 8, 2018
2 parents 10b207d + 427d10e commit ac0383d
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions spec/cases/api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
context "Company API", :vcr do

it "should be able to view a company profile" do
stub_request(:get, "https://api.linkedin.com/v1/companies/id=1586").to_return(:body => "{}")
stub_request(:get, "https://api.linkedin.com/v1/companies/1586").to_return(:body => "{}")
client.company(:id => 1586).should be_an_instance_of(LinkedIn::Mash)
end

Expand All @@ -144,8 +144,9 @@
end

it "should load correct company data" do
stub_request(:get, "https://api.linkedin.com/v1/companies/1586:(id,name,industry,locations:(address:(city,state,country-code),is-headquarters),employee-count-range)").to_return(:body => "{\"id\":1586,\"name\":\"Amazon\",\"employee_count_range\":{\"name\":\"10001+\"},\"industry\":\"Internet\",\"locations\":{\"all\":[{\"address\":{\"city\":\"Seattle\"},\"is_headquarters\":true}]}}")
stub_request(:get, "https://api.linkedin.com/v1/companies/1586").to_return(:body => "{\"id\":1586,\"name\":\"Amazon\"}")
client.company(:id => 1586).name.should == "Amazon"

data = client.company(:id => 1586, :fields => %w{ id name industry locations:(address:(city state country-code) is-headquarters) employee-count-range })
data.id.should == 1586
data.name.should == "Amazon"
Expand All @@ -156,22 +157,22 @@
end

it "should be able to view company_updates" do
stub_request(:get, "https://api.linkedin.com/v1/companies/id=1586/updates").to_return(:body => "{}")
stub_request(:get, "https://api.linkedin.com/v1/companies/1586/updates").to_return(:body => "{}")
client.company_updates(:id => 1586).should be_an_instance_of(LinkedIn::Mash)
end

it "should be able to view company_statistic" do
stub_request(:get, "https://api.linkedin.com/v1/companies/id=1586/company-statistics").to_return(:body => "{}")
stub_request(:get, "https://api.linkedin.com/v1/companies/1586/company-statistics").to_return(:body => "{}")
client.company_statistics(:id => 1586).should be_an_instance_of(LinkedIn::Mash)
end

it "should be able to view company updates comments" do
stub_request(:get, "https://api.linkedin.com/v1/companies/id=1586/updates/key=company_update_key/update-comments").to_return(:body => "{}")
stub_request(:get, "https://api.linkedin.com/v1/companies/1586/updates/key=company_update_key/update-comments").to_return(:body => "{}")
client.company_updates_comments("company_update_key", :id => 1586).should be_an_instance_of(LinkedIn::Mash)
end

it "should be able to view company updates likes" do
stub_request(:get, "https://api.linkedin.com/v1/companies/id=1586/updates/key=company_update_key/likes").to_return(:body => "{}")
stub_request(:get, "https://api.linkedin.com/v1/companies/1586/updates/key=company_update_key/likes").to_return(:body => "{}")
client.company_updates_likes("company_update_key", :id => 1586).should be_an_instance_of(LinkedIn::Mash)
end

Expand Down

0 comments on commit ac0383d

Please sign in to comment.