summaryrefslogtreecommitdiffstats
path: root/spec/unit
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/network/http/webrick.rb6
-rwxr-xr-xspec/unit/ssl/certificate_authority.rb11
2 files changed, 9 insertions, 8 deletions
diff --git a/spec/unit/network/http/webrick.rb b/spec/unit/network/http/webrick.rb
index 1955c3e00..48b995c28 100644
--- a/spec/unit/network/http/webrick.rb
+++ b/spec/unit/network/http/webrick.rb
@@ -337,7 +337,7 @@ describe Puppet::Network::HTTP::WEBrick do
it "should specify the path to the CA certificate" do
Puppet.settings.stubs(:value).returns "whatever"
- Puppet.settings.stubs(:value).with(:cacrl).returns 'false'
+ Puppet.settings.stubs(:value).with(:hostcrl).returns 'false'
Puppet.settings.stubs(:value).with(:localcacert).returns '/ca/crt'
@server.setup_ssl[:SSLCACertificateFile].should == "/ca/crt"
@@ -357,7 +357,7 @@ describe Puppet::Network::HTTP::WEBrick do
it "should add an x509 store if the CRL is enabled" do
Puppet.settings.stubs(:value).returns "whatever"
- Puppet.settings.stubs(:value).with(:cacrl).returns '/my/crl'
+ Puppet.settings.stubs(:value).with(:hostcrl).returns '/my/crl'
@server.expects(:setup_ssl_store).returns("mystore")
@@ -366,7 +366,7 @@ describe Puppet::Network::HTTP::WEBrick do
it "should not add an x509 store if the CRL is disabled" do
Puppet.settings.stubs(:value).returns "whatever"
- Puppet.settings.stubs(:value).with(:cacrl).returns 'false'
+ Puppet.settings.stubs(:value).with(:hostcrl).returns 'false'
@server.expects(:setup_ssl_store).never
diff --git a/spec/unit/ssl/certificate_authority.rb b/spec/unit/ssl/certificate_authority.rb
index 09aaeabcf..424f47512 100755
--- a/spec/unit/ssl/certificate_authority.rb
+++ b/spec/unit/ssl/certificate_authority.rb
@@ -72,16 +72,16 @@ describe Puppet::SSL::CertificateAuthority do
end
describe "and the CRL is disabled" do
- it "should return nil when the :cacrl is false" do
- Puppet.settings.stubs(:value).with(:cacrl).returns false
+ it "should return nil when the :crl is false" do
+ Puppet.settings.stubs(:value).with(:crl).returns false
Puppet::SSL::CertificateRevocationList.expects(:new).never
@ca.crl.should be_nil
end
- it "should return nil when the :cacrl is 'false'" do
- Puppet.settings.stubs(:value).with(:cacrl).returns 'false'
+ it "should return nil when the :crl is 'false'" do
+ Puppet.settings.stubs(:value).with(:crl).returns false
Puppet::SSL::CertificateRevocationList.expects(:new).never
@@ -105,13 +105,14 @@ describe Puppet::SSL::CertificateAuthority do
@ca.crl.should equal(crl)
end
- it "should create and generate a new CRL instance of no CRL can be found" do
+ it "should create, generate, and save a new CRL instance of no CRL can be found" do
crl = mock 'crl'
Puppet::SSL::CertificateRevocationList.expects(:find).returns nil
Puppet::SSL::CertificateRevocationList.expects(:new).returns crl
crl.expects(:generate).with(@ca.host.certificate.content)
+ crl.expects(:save)
@ca.crl.should equal(crl)
end