Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions spec/cases/api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,11 @@
let(:client){LinkedIn::Client.new('token', 'secret')}
let(:consumer){OAuth::Consumer.new('token', 'secret', {:site => 'https://api.linkedin.com'})}

it "should be able to view the account profile" do
stub_request(:get, "https://api.linkedin.com/v1/people/~").to_return(:body => "{}")
client.profile.should be_an_instance_of(LinkedIn::Mash)
end

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

it "should be able to view the picture urls" do
stub_request(:get, "https://api.linkedin.com/v1/people/~/picture-urls::(original)").to_return(:body => "{}")
client.picture_urls.should be_an_instance_of(LinkedIn::Mash)
end

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

it "should be able to view new connections" do
modified_since = Time.now.to_i * 1000
stub_request(:get, "https://api.linkedin.com/v1/people/~/connections?modified=new&modified-since=#{modified_since}").to_return(:body => "{}")
client.new_connections(modified_since).should be_an_instance_of(LinkedIn::Mash)
end

it "should be able to view network_updates" do
stub_request(:get, "https://api.linkedin.com/v1/people/~/network/updates").to_return(:body => "{}")
client.network_updates.should be_an_instance_of(LinkedIn::Mash)
Expand Down
Loading