spec/shelly/client_spec.rb in shelly-0.0.49 vs spec/shelly/client_spec.rb in shelly-0.0.50.pre

- old
+ new

@@ -168,15 +168,17 @@ @client.should_receive(:post).with("/apps", :app => {:code_name => "foo", :ruby_version => "1.9.2"}) @client.create_app(:code_name => "foo", :ruby_version => "1.9.2") end end - describe "#app_users" do + describe "#collaborations" do it "should send get request with app code_names" do - FakeWeb.register_uri(:get, api_url("apps/staging-foo/users"), :body => [{:email => "test@example.com"}, - {:email => "test2@example.com"}].to_json) - response = @client.app_users("staging-foo") - response.should == [{"email" => "test@example.com"}, {"email" => "test2@example.com"}] + FakeWeb.register_uri(:get, api_url("apps/staging-foo/collaborations"), + :body => [{:email => "test@example.com", :active => true}, + {:email => "test2@example.com", :active => false}].to_json) + response = @client.collaborations("staging-foo") + response.should == [{"email" => "test@example.com", 'active' => true}, + {"email" => "test2@example.com", 'active' => false}] end end describe "#app" do it "should fetch app from API" do