diff options
author | Luke Kanies <luke@madstop.com> | 2009-09-17 17:13:59 -0700 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2009-11-20 07:24:51 +1100 |
commit | 28e1bc6e7b866727adfd16cba5418e08f1dd2fd8 (patch) | |
tree | 09d913f03257f4defbb873d189aa619df27c3455 /spec/unit/ssl | |
parent | 2d4b795e81e4f7953210d51be56c77bed3b77609 (diff) | |
download | puppet-28e1bc6e7b866727adfd16cba5418e08f1dd2fd8.tar.gz puppet-28e1bc6e7b866727adfd16cba5418e08f1dd2fd8.tar.xz puppet-28e1bc6e7b866727adfd16cba5418e08f1dd2fd8.zip |
Always using the CA_name constant instead of "ca"
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/unit/ssl')
-rwxr-xr-x | spec/unit/ssl/host.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/unit/ssl/host.rb b/spec/unit/ssl/host.rb index 38a1f3ed9..51223e6d5 100755 --- a/spec/unit/ssl/host.rb +++ b/spec/unit/ssl/host.rb @@ -415,7 +415,7 @@ describe Puppet::SSL::Host do end it "should find the CA certificate if it does not have a certificate" do - Puppet::SSL::Certificate.expects(:find).with("ca").returns mock("cacert") + Puppet::SSL::Certificate.expects(:find).with(Puppet::SSL::CA_NAME).returns mock("cacert") Puppet::SSL::Certificate.stubs(:find).with("myname").returns @cert @host.certificate @@ -424,13 +424,13 @@ describe Puppet::SSL::Host do it "should not find the CA certificate if it is the CA host" do @host.expects(:ca?).returns true Puppet::SSL::Certificate.stubs(:find) - Puppet::SSL::Certificate.expects(:find).with("ca").never + Puppet::SSL::Certificate.expects(:find).with(Puppet::SSL::CA_NAME).never @host.certificate end it "should return nil if it cannot find a CA certificate" do - Puppet::SSL::Certificate.expects(:find).with("ca").returns nil + Puppet::SSL::Certificate.expects(:find).with(Puppet::SSL::CA_NAME).returns nil Puppet::SSL::Certificate.expects(:find).with("myname").never @host.certificate.should be_nil @@ -453,7 +453,7 @@ describe Puppet::SSL::Host do end it "should find the certificate in the Certificate class and return the Puppet certificate instance" do - Puppet::SSL::Certificate.expects(:find).with("ca").returns mock("cacert") + Puppet::SSL::Certificate.expects(:find).with(Puppet::SSL::CA_NAME).returns mock("cacert") Puppet::SSL::Certificate.expects(:find).with("myname").returns @cert @host.certificate.should equal(@cert) @@ -468,7 +468,7 @@ describe Puppet::SSL::Host do end it "should return any previously found certificate" do - Puppet::SSL::Certificate.expects(:find).with("ca").returns mock("cacert") + Puppet::SSL::Certificate.expects(:find).with(Puppet::SSL::CA_NAME).returns mock("cacert") Puppet::SSL::Certificate.expects(:find).with("myname").returns(@cert).once @host.certificate.should equal(@cert) |