Permalink
Browse files

Fix name of list_add_members resource

  • Loading branch information...
1 parent 38c9dd0 commit 3adcc1592240be2679f0a2c7d0c390b574abe8f1 @sferik committed Feb 28, 2011
Showing with 5 additions and 5 deletions.
  1. +1 −1 lib/twitter/client/list_members.rb
  2. +4 −4 spec/twitter/client/list_members_spec.rb
@@ -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
@@ -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
@@ -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

0 comments on commit 3adcc15

Please sign in to comment.