diff options
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/unit/application/puppetca.rb | 5 | ||||
| -rwxr-xr-x | spec/unit/ssl/certificate_authority/interface.rb | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/spec/unit/application/puppetca.rb b/spec/unit/application/puppetca.rb index d5ee0d06b..3bab6c77d 100644 --- a/spec/unit/application/puppetca.rb +++ b/spec/unit/application/puppetca.rb @@ -49,6 +49,11 @@ describe "PuppetCA" do @puppetca.all.should be_true end + it "should set signed to true for --signed" do + @puppetca.handle_signed(0) + @puppetca.signed.should be_true + end + Puppet::SSL::CertificateAuthority::Interface::INTERFACE_METHODS.reject { |m| m == :destroy }.each do |method| it "should set mode to #{method} with option --#{method}" do @puppetca.send("handle_#{method}".to_sym, nil) diff --git a/spec/unit/ssl/certificate_authority/interface.rb b/spec/unit/ssl/certificate_authority/interface.rb index d741ec400..b1c203c5d 100755 --- a/spec/unit/ssl/certificate_authority/interface.rb +++ b/spec/unit/ssl/certificate_authority/interface.rb @@ -204,6 +204,16 @@ describe Puppet::SSL::CertificateAuthority::Interface do end end + describe "and :signed was provided" do + it "should print a string containing all signed certificate requests and certificates" do + @ca.expects(:list).returns %w{host1 host2} + + @applier = @class.new(:list, :signed) + + @applier.apply(@ca) + end + end + describe "and an array of names was provided" do it "should print a string of all named hosts that have a waiting request" do @ca.expects(:waiting?).returns %w{host1 host2} |
