Sha256: bd260cac4b9ef89483a3fa8a02f32d7b6db0b249072942a3f26683efa0b77e73

Contents?: true

Size: 777 Bytes

Versions: 36

Compression:

Stored size: 777 Bytes

Contents

require 'spec_helper'

require 'puppet/indirector/certificate/file'

describe Puppet::SSL::Certificate::File do
  it "should have documentation" do
    expect(Puppet::SSL::Certificate::File.doc).to be_instance_of(String)
  end

  it "should use the :certdir as the collection directory" do
    Puppet[:certdir] = File.expand_path("/cert/dir")
    expect(Puppet::SSL::Certificate::File.collection_directory).to eq(Puppet[:certdir])
  end

  it "should store the ca certificate at the :localcacert location" do
    allow(Puppet.settings).to receive(:use)
    Puppet[:localcacert] = File.expand_path("/ca/cert")
    file = Puppet::SSL::Certificate::File.new
    allow(file).to receive(:ca?).and_return(true)
    expect(file.path("whatever")).to eq(Puppet[:localcacert])
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
puppet-5.5.22 spec/unit/indirector/certificate/file_spec.rb
puppet-5.5.22-x86-mingw32 spec/unit/indirector/certificate/file_spec.rb
puppet-5.5.22-x64-mingw32 spec/unit/indirector/certificate/file_spec.rb
puppet-5.5.22-universal-darwin spec/unit/indirector/certificate/file_spec.rb
puppet-5.5.21 spec/unit/indirector/certificate/file_spec.rb
puppet-5.5.21-x86-mingw32 spec/unit/indirector/certificate/file_spec.rb
puppet-5.5.21-x64-mingw32 spec/unit/indirector/certificate/file_spec.rb
puppet-5.5.21-universal-darwin spec/unit/indirector/certificate/file_spec.rb
puppet-5.5.20 spec/unit/indirector/certificate/file_spec.rb
puppet-5.5.20-x86-mingw32 spec/unit/indirector/certificate/file_spec.rb
puppet-5.5.20-x64-mingw32 spec/unit/indirector/certificate/file_spec.rb
puppet-5.5.20-universal-darwin spec/unit/indirector/certificate/file_spec.rb
puppet-5.5.19 spec/unit/indirector/certificate/file_spec.rb
puppet-5.5.19-x86-mingw32 spec/unit/indirector/certificate/file_spec.rb
puppet-5.5.19-x64-mingw32 spec/unit/indirector/certificate/file_spec.rb
puppet-5.5.19-universal-darwin spec/unit/indirector/certificate/file_spec.rb
puppet-5.5.18 spec/unit/indirector/certificate/file_spec.rb
puppet-5.5.18-x86-mingw32 spec/unit/indirector/certificate/file_spec.rb
puppet-5.5.18-x64-mingw32 spec/unit/indirector/certificate/file_spec.rb
puppet-5.5.18-universal-darwin spec/unit/indirector/certificate/file_spec.rb