spec/shelly/app_spec.rb in shelly-0.0.28 vs spec/shelly/app_spec.rb in shelly-0.0.29

- old
+ new

@@ -16,16 +16,23 @@ Shelly::App.guess_code_name.should == "foo" end end describe "#users" do - it "should " do - @client.should_receive(:app_users).with(["staging-foo", "production-foo"]) - @app.users(["staging-foo", "production-foo"]) + it "should fetch app's users" do + @client.should_receive(:app_users).with("foo-staging") + @app.users end end + describe "#ips" do + it "should get app's ips" do + @client.should_receive(:app_ips).with("foo-staging") + @app.ips + end + end + describe "#add_git_remote" do before do @app.stub(:git_url).and_return("git@git.shellycloud.com:foo-staging.git") @app.stub(:system) end @@ -105,9 +112,28 @@ user = mock(:token => "abc", :email => nil, :password => nil, :config_dir => "~/.shelly") @app.stub(:current_user).and_return(user) url = "#{@app.shelly.shellyapp_url}/login?api_key=abc&return_to=/apps/foo-staging/edit_billing" Launchy.should_receive(:open).with(url) @app.open_billing_page + end + end + + describe "#start & #stop" do + it "should start cloud" do + @client.should_receive(:start_cloud).with("foo-staging") + @app.start + end + + it "should stop cloud" do + @client.should_receive(:stop_cloud).with("foo-staging") + @app.stop + end + end + + describe "#logs" do + it "should list logs" do + @client.should_receive(:cloud_logs).with("foo-staging") + @app.logs end end describe "#create" do context "without providing domain" do