File: trusted_external_data_spec.rb

package info (click to toggle)
ruby-rspec-puppet 4.0.2%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,444 kB
  • sloc: ruby: 6,377; makefile: 6
file content (25 lines) | stat: -rw-r--r-- 714 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# frozen_string_literal: true

require 'spec_helper'

describe 'trusted_external_data' do
  context 'no trusted external data' do
    it { is_expected.to contain_class('trusted_external_data') }
    it { is_expected.to compile.with_all_deps }
    it { is_expected.to 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 { is_expected.to contain_class('trusted_external_data') }
    it { is_expected.to compile.with_all_deps }

    external_data.each do |k, v|
      it { is_expected.to contain_notify("external-#{k}-#{v}") }
    end
  end
end