Skip to content

Commit

Permalink
Fix name of list_add_members resource
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Feb 28, 2011
1 parent 38c9dd0 commit 3adcc15
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/twitter/client/list_members.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def list_add_members(*args)
users, list_id = args.pop, args.pop
screen_name = args.pop || get_screen_name
merge_users_into_options!(Array(users), options)
response = post("#{screen_name}/#{list_id}/create_all", options)
response = post("#{screen_name}/#{list_id}/members/create_all", options)
format.to_s.downcase == 'xml' ? response['list'] : response
end

Expand Down
8 changes: 4 additions & 4 deletions spec/twitter/client/list_members_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@
context "with screen name passed" do

before do
stub_post("sferik/presidents/create_all.#{format}").
stub_post("sferik/presidents/members/create_all.#{format}").
with(:body => {:user_id => "813286,18755393"}).
to_return(:body => fixture("list.#{format}"), :headers => {:content_type => "application/#{format}; charset=utf-8"})
end

it "should get the correct resource" do
@client.list_add_members("sferik", "presidents", [813286, 18755393])
a_post("sferik/presidents/create_all.#{format}").
a_post("sferik/presidents/members/create_all.#{format}").
with(:body => {:user_id => "813286,18755393"}).
should have_been_made
end
Expand All @@ -124,14 +124,14 @@

before do
@client.stub!(:get_screen_name).and_return('sferik')
stub_post("sferik/presidents/create_all.#{format}").
stub_post("sferik/presidents/members/create_all.#{format}").
with(:body => {:user_id => "813286,18755393"}).
to_return(:body => fixture("list.#{format}"), :headers => {:content_type => "application/#{format}; charset=utf-8"})
end

it "should get the correct resource" do
@client.list_add_members("presidents", [813286, 18755393])
a_post("sferik/presidents/create_all.#{format}").
a_post("sferik/presidents/members/create_all.#{format}").
with(:body => {:user_id => "813286,18755393"}).
should have_been_made
end
Expand Down

0 comments on commit 3adcc15

Please sign in to comment.