File: trusted_external_data_spec.rb

package info (click to toggle)
ruby-rspec-puppet 2.9.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,416 kB
  • sloc: ruby: 6,661; makefile: 6
file content (22 lines) | stat: -rw-r--r-- 709 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
require 'spec_helper'

describe 'trusted_external_data', :if => Puppet::Util::Package.versioncmp(Puppet.version, '6.14.0') >= 0 do
  context 'no trusted external data' do
    it { should contain_class('trusted_external_data') }
    it { should compile.with_all_deps }
    it { should contain_notify("no-external-data") }
  end

  context 'with trusted external data' do
    external_data = {:foo_key => "foo_value", :bar_key => "bar_value"}
    let(:trusted_external_data) do
      external_data
    end

    it { should contain_class('trusted_external_data') }
    it { should compile.with_all_deps }
    external_data.each do |k,v|
      it { should contain_notify("external-#{k}-#{v}") }
    end
  end
end