Skip to content

Commit 271c87f

Browse files
Matt Kirkhundredwatt
authored andcommitted
Take out group path delete(:id)
1 parent 9ab98da commit 271c87f

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

spec/cases/api_spec.rb

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,25 @@
250250
response.status.should == 201
251251
end
252252

253-
it "should be able to list a group profile" do
254-
stub_request(:get, "https://api.linkedin.com/v1/groups/123").to_return(:body => '{"id": "123"}')
255-
response = client.group_profile(:id => 123)
256-
response.id.should == '123'
253+
context '#group_profile' do
254+
let(:options) do
255+
{:id => 123}
256+
end
257+
258+
before do
259+
stub_request(:get, "https://api.linkedin.com/v1/groups/123").to_return(:body => '{"id": "123"}')
260+
end
261+
262+
it "doesn't mangle the options hash with group_profile" do
263+
original_options = options.dup
264+
client.group_profile(options)
265+
options.should == original_options
266+
end
267+
268+
it "lists a group profile" do
269+
response = client.group_profile(options)
270+
response.id.should == options.fetch(:id).to_s
271+
end
257272
end
258273

259274
it "should be able to list group posts" do

0 commit comments

Comments
 (0)