spec/shelly/app_spec.rb in shelly-0.4.42 vs spec/shelly/app_spec.rb in shelly-0.5.0
- old
+ new
@@ -151,10 +151,11 @@
end
describe "#attributes" do
before do
@response = {"web_server_ip" => "192.0.2.1",
+ "region" => "EU",
"state" => "running",
"maintenance" => false,
"organization" => {
"credit" => 23.0,
"details_present" => true
@@ -188,10 +189,16 @@
it "should return web server ip address" do
@app.web_server_ip.should == "192.0.2.1"
end
end
+ describe "#region" do
+ it "should return cloud region" do
+ @app.region.should == "EU"
+ end
+ end
+
describe "#state" do
it "should return state of cloud" do
@app.state.should == "running"
end
end
@@ -354,10 +361,11 @@
@app.code_name = "fooo"
attributes = {
:code_name => "fooo",
:organization_name => nil,
- :zone => nil
+ :zone => nil,
+ :region => nil
}
@client.should_receive(:create_app).with(attributes).and_return("git_url" => "git@git.shellycloud.com:fooo.git",
"domains" => %w(fooo.shellyapp.com))
@app.create
end