summaryrefslogtreecommitdiffstats
path: root/spec/unit/indirector
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-03-11 15:02:15 -0700
committerLuke Kanies <luke@madstop.com>2008-04-15 21:34:04 -0500
commit00e35bce4e8b7f4e0e4ee039a1d82ad9d08a6b96 (patch)
tree823d3210e4c66643d14752f93334744a12e13ae1 /spec/unit/indirector
parent8347b0605612128b1a9e9f2d2d2e5ea73dae288d (diff)
downloadpuppet-00e35bce4e8b7f4e0e4ee039a1d82ad9d08a6b96.tar.gz
puppet-00e35bce4e8b7f4e0e4ee039a1d82ad9d08a6b96.tar.xz
puppet-00e35bce4e8b7f4e0e4ee039a1d82ad9d08a6b96.zip
Adding he last of the indirection classes for the ssl
classes, finally including the certificate requests.
Diffstat (limited to 'spec/unit/indirector')
-rwxr-xr-xspec/unit/indirector/certificate/ca_file.rb19
-rwxr-xr-xspec/unit/indirector/certificate_request/ca_file.rb19
-rwxr-xr-xspec/unit/indirector/certificate_request/file.rb19
3 files changed, 57 insertions, 0 deletions
diff --git a/spec/unit/indirector/certificate/ca_file.rb b/spec/unit/indirector/certificate/ca_file.rb
new file mode 100755
index 000000000..98075170d
--- /dev/null
+++ b/spec/unit/indirector/certificate/ca_file.rb
@@ -0,0 +1,19 @@
+#!/usr/bin/env ruby
+#
+# Created by Luke Kanies on 2008-3-7.
+# Copyright (c) 2007. All rights reserved.
+
+require File.dirname(__FILE__) + '/../../../spec_helper'
+
+require 'puppet/indirector/certificate/ca_file'
+
+describe Puppet::SSL::Certificate::CaFile do
+ it "should have documentation" do
+ Puppet::SSL::Certificate::CaFile.doc.should be_instance_of(String)
+ end
+
+ it "should use the :signeddir as the collection directory" do
+ Puppet.settings.expects(:value).with(:signeddir).returns "/cert/dir"
+ Puppet::SSL::Certificate::CaFile.collection_directory.should == "/cert/dir"
+ end
+end
diff --git a/spec/unit/indirector/certificate_request/ca_file.rb b/spec/unit/indirector/certificate_request/ca_file.rb
new file mode 100755
index 000000000..7b264fefb
--- /dev/null
+++ b/spec/unit/indirector/certificate_request/ca_file.rb
@@ -0,0 +1,19 @@
+#!/usr/bin/env ruby
+#
+# Created by Luke Kanies on 2008-3-7.
+# Copyright (c) 2007. All rights reserved.
+
+require File.dirname(__FILE__) + '/../../../spec_helper'
+
+require 'puppet/indirector/certificate_request/ca_file'
+
+describe Puppet::SSL::CertificateRequest::CaFile do
+ it "should have documentation" do
+ Puppet::SSL::CertificateRequest::CaFile.doc.should be_instance_of(String)
+ end
+
+ it "should use the :csrdir as the collection directory" do
+ Puppet.settings.expects(:value).with(:csrdir).returns "/request/dir"
+ Puppet::SSL::CertificateRequest::CaFile.collection_directory.should == "/request/dir"
+ end
+end
diff --git a/spec/unit/indirector/certificate_request/file.rb b/spec/unit/indirector/certificate_request/file.rb
new file mode 100755
index 000000000..c4595b932
--- /dev/null
+++ b/spec/unit/indirector/certificate_request/file.rb
@@ -0,0 +1,19 @@
+#!/usr/bin/env ruby
+#
+# Created by Luke Kanies on 2008-3-7.
+# Copyright (c) 2007. All rights reserved.
+
+require File.dirname(__FILE__) + '/../../../spec_helper'
+
+require 'puppet/indirector/certificate_request/file'
+
+describe Puppet::SSL::CertificateRequest::CaFile do
+ it "should have documentation" do
+ Puppet::SSL::CertificateRequest::CaFile.doc.should be_instance_of(String)
+ end
+
+ it "should use the :requestdir as the collection directory" do
+ Puppet.settings.expects(:value).with(:requestdir).returns "/request/dir"
+ Puppet::SSL::CertificateRequest::CaFile.collection_directory.should == "/request/dir"
+ end
+end