Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

add test for group_id param

  • Loading branch information...
commit bf3f181fd2e79887d80fa3382a256f2196362fc2 1 parent b8f55e7
Ryan Sonnek authored

Showing 1 changed file with 13 additions and 0 deletions. Show diff stats Hide diff stats

  1. +13 0 spec/cli_spec.rb
13 spec/cli_spec.rb
@@ -32,6 +32,19 @@
32 32 # See expectations
33 33 end
34 34 end
  35 + context 'with a group_id param' do
  36 + before do
  37 + Socialcast.stub(:credentials).and_return(YAML.load_file(File.join(File.dirname(__FILE__), 'fixtures', 'credentials.yml')))
  38 + stub_request(:post, "https://ryan%40socialcast.com:foo@test.staging.socialcast.com/api/messages.json").
  39 + with(:body => /group\_id\"\:123/).
  40 + to_return(:status => 200, :body => "", :headers => {})
  41 +
  42 + Socialcast::CLI.start ['share', 'hi', '--group_id=123']
  43 + end
  44 + it 'should send a POST with group_id param == 123' do
  45 + # See expectations
  46 + end
  47 + end
35 48 context "with a proxy" do
36 49 before do
37 50 Socialcast.stub(:credentials).and_return(YAML.load_file(File.join(File.dirname(__FILE__), 'fixtures', 'credentials_with_proxy.yml')))

0 comments on commit bf3f181

Please sign in to comment.
Something went wrong with that request. Please try again.