summaryrefslogtreecommitdiffstats
path: root/spec/unit/application
diff options
context:
space:
mode:
authorJesse Wolfe <jes5199@gmail.com>2010-07-02 15:54:28 -0700
committerMarkus Roberts <Markus@reality.com>2010-07-06 23:57:53 -0700
commit6d4be90a6704ce26bad55e2d2cd3949526fea678 (patch)
treea9c9741a5846215c3aa19ddf6731fa41c52bac6b /spec/unit/application
parent0598f35d6680e6f58f564c6da546ab307d0f3c3b (diff)
[#3961] Part two: --destroy should also be local
Diffstat (limited to 'spec/unit/application')
-rwxr-xr-xspec/unit/application/cert_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/unit/application/cert_spec.rb b/spec/unit/application/cert_spec.rb
index a72532e50..c1ff38b26 100755
--- a/spec/unit/application/cert_spec.rb
+++ b/spec/unit/application/cert_spec.rb
@@ -112,6 +112,24 @@ describe Puppet::Application::Cert do
@cert_app.setup
end
+
+ it "should set the ca_location to :local if the cert_mode is generate" do
+ @cert_app.find_mode('--generate')
+ Puppet::SSL::Host.expects(:ca_location=).with(:local)
+ @cert_app.setup
+ end
+
+ it "should set the ca_location to :local if the cert_mode is destroy" do
+ @cert_app.find_mode('--destroy')
+ Puppet::SSL::Host.expects(:ca_location=).with(:local)
+ @cert_app.setup
+ end
+
+ it "should set the ca_location to :only if the cert_mode is print" do
+ @cert_app.find_mode('--print')
+ Puppet::SSL::Host.expects(:ca_location=).with(:only)
+ @cert_app.setup
+ end
end
describe "when running" do