Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add test for group_id param

  • Loading branch information...
commit bf3f181fd2e79887d80fa3382a256f2196362fc2 1 parent b8f55e7
Ryan Sonnek authored
Showing with 13 additions and 0 deletions.
  1. +13 −0 spec/cli_spec.rb
13 spec/cli_spec.rb
View
@@ -32,6 +32,19 @@
# See expectations
end
end
+ context 'with a group_id param' do
+ before do
+ Socialcast.stub(:credentials).and_return(YAML.load_file(File.join(File.dirname(__FILE__), 'fixtures', 'credentials.yml')))
+ stub_request(:post, "https://ryan%40socialcast.com:foo@test.staging.socialcast.com/api/messages.json").
+ with(:body => /group\_id\"\:123/).
+ to_return(:status => 200, :body => "", :headers => {})
+
+ Socialcast::CLI.start ['share', 'hi', '--group_id=123']
+ end
+ it 'should send a POST with group_id param == 123' do
+ # See expectations
+ end
+ end
context "with a proxy" do
before do
Socialcast.stub(:credentials).and_return(YAML.load_file(File.join(File.dirname(__FILE__), 'fixtures', 'credentials_with_proxy.yml')))
Please sign in to comment.
Something went wrong with that request. Please try again.