spec/shelly/cli/cert_spec.rb in shelly-0.4.9 vs spec/shelly/cli/cert_spec.rb in shelly-0.4.10
- old
+ new
@@ -52,11 +52,11 @@
and_return(cert_response)
$stdout.should_receive(:puts).with(green "Certificate was added to your cloud")
$stdout.should_receive(:puts).with("Deploying certificate on front end.")
$stdout.should_receive(:puts).with("Point your domain to private IP address: 10.0.0.1")
- invoke(@cli, :create, "crt_path", "bundle_path", "key_path")
+ invoke(@cli, :create, "crt_path", "key_path", "bundle_path")
end
it "should create certificate without bundle" do
@app.should_receive(:create_cert).with("crt\n", "key").
and_return(cert_response('ip_address' => nil))
@@ -74,11 +74,11 @@
exception = Shelly::Client::ValidationException.new({"errors" => [["key", "is invalid"]]})
@app.should_receive(:create_cert).and_raise(exception)
$stdout.should_receive(:puts).with(red "Key is invalid")
lambda {
- invoke(@cli, :create, "crt_path", "bundle_path", "key_path")
+ invoke(@cli, :create, "crt_path", "key_path", "bundle_path")
}.should raise_error(SystemExit)
end
end
context "deployment conflict" do
@@ -86,11 +86,11 @@
exception = Shelly::Client::ConflictException.new({"message" => "Deployment is in progress"})
@app.should_receive(:create_cert).and_raise(exception)
$stdout.should_receive(:puts).with(red "Deployment is in progress")
lambda {
- invoke(@cli, :create, "crt_path", "bundle_path", "key_path")
+ invoke(@cli, :create, "crt_path", "key_path", "bundle_path")
}.should raise_error(SystemExit)
end
end
end
@@ -106,11 +106,11 @@
and_return(cert_response)
$stdout.should_receive(:puts).with(green "Certificate was updated")
$stdout.should_receive(:puts).with("Deploying certificate on front end.")
$stdout.should_receive(:puts).with("Point your domain to private IP address: 10.0.0.1")
- invoke(@cli, :update, "crt_path", "bundle_path", "key_path")
+ invoke(@cli, :update, "crt_path", "key_path", "bundle_path")
end
it "should create certificate without bundle" do
@app.should_receive(:update_cert).with("crt\n", "key").
and_return(cert_response('ip_address' => nil))
@@ -128,11 +128,11 @@
exception = Shelly::Client::ValidationException.new({"errors" => [["key", "is invalid"]]})
@app.should_receive(:update_cert).and_raise(exception)
$stdout.should_receive(:puts).with(red "Key is invalid")
lambda {
- invoke(@cli, :update, "crt_path", "bundle_path", "key_path")
+ invoke(@cli, :update, "crt_path", "key_path", "bundle_path")
}.should raise_error(SystemExit)
end
end
context "deployment conflict" do
@@ -140,10 +140,10 @@
exception = Shelly::Client::ConflictException.new({"message" => "Deployment is in progress"})
@app.should_receive(:update_cert).and_raise(exception)
$stdout.should_receive(:puts).with(red "Deployment is in progress")
lambda {
- invoke(@cli, :update, "crt_path", "bundle_path", "key_path")
+ invoke(@cli, :update, "crt_path", "key_path", "bundle_path")
}.should raise_error(SystemExit)
end
end
end