spec/shelly/client_spec.rb in shelly-0.1.0 vs spec/shelly/client_spec.rb in shelly-0.1.1
- old
+ new
@@ -197,9 +197,19 @@
response = @client.command("staging-foo", "2 + 2", :ruby)
response.should == {"result" => "4"}
end
end
+ describe "#console" do
+ it "should fetch instance data from API" do
+ body = {:port => "40010", :node_ip => "10.0.0.10", :user => "foo-production"}
+ FakeWeb.register_uri(:get, api_url("apps/staging-foo/console"),
+ :body => body.to_json)
+ response = @client.console("staging-foo")
+ response.should == {"port" => "40010", "node_ip" => "10.0.0.10", "user"=>"foo-production"}
+ 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)
response = @client.send_invitation("staging-foo", "megan@example.com")
response.should == {}