spec/shelly/client_spec.rb in shelly-0.0.44.pre vs spec/shelly/client_spec.rb in shelly-0.0.44.pre2

- old
+ new

@@ -186,9 +186,18 @@ response = @client.app("staging-foo") response.should == {"web_server_ip" => "192.0.2.1", "mail_server_ip" => "192.0.2.3"} end end + describe "#run" do + it "should send post request with app code_name and code" do + FakeWeb.register_uri(:post, api_url("apps/staging-foo/run"), + :body => {:result => "4"}.to_json) + response = @client.run("staging-foo", "2 + 2") + response.should == {"result" => "4"} + end + end + describe "#send_invitation" do it "should send post with developer's email" do FakeWeb.register_uri(:post, api_url("apps/staging-foo/collaborations"), :body => {}.to_json) FakeWeb.register_uri(:post, api_url("apps/production-foo/collaborations"), :body => {}.to_json) response = @client.send_invitation("staging-foo", "megan@example.com")