Sha256: 24ef82e72f08f9659baa4e1c0b569152caa1b34e255711fbc48df392aca8eba4

Contents?: true

Size: 1.07 KB

Versions: 32

Compression:

Stored size: 1.07 KB

Contents

require 'test_puppet_helper'

module ForemanPuppet
  class PuppetclassLookupKeysHelperTest < ActionView::TestCase
    include PuppetclassLookupKeysHelper

    describe '#overridable_puppet_lookup_keys' do
      let(:parent_puppet_var) { FactoryBot.create(:puppetclass_lookup_key) }
      let(:parent_hg) { FactoryBot.create(:hostgroup, :with_puppet_enc, environment: parent_puppet_var.environments.first) }

      context 'with new hostgroup' do
        subject do
          hg = Hostgroup.new(parent: parent_hg)
          hg.build_puppet
          hg
        end

        it 'returns inherited parameter' do
          keys = overridable_puppet_lookup_keys(parent_puppet_var.param_classes.first, subject)
          _(keys).must_include(parent_puppet_var)
        end
      end

      context 'with new host' do
        subject { Host.new(hostgroup: parent_hg) }

        it 'returns inherited parameter' do
          keys = overridable_puppet_lookup_keys(parent_puppet_var.param_classes.first, subject)
          _(keys).must_include(parent_puppet_var)
        end
      end
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
foreman_puppet-8.0.0 test/helpers/foreman_puppet/puppetclass_lookup_keys_helper_test.rb
foreman_puppet-6.4.0 test/helpers/foreman_puppet/puppetclass_lookup_keys_helper_test.rb
foreman_puppet-7.0.0 test/helpers/foreman_puppet/puppetclass_lookup_keys_helper_test.rb
foreman_puppet-6.3.0 test/helpers/foreman_puppet/puppetclass_lookup_keys_helper_test.rb
foreman_puppet-6.2.0 test/helpers/foreman_puppet/puppetclass_lookup_keys_helper_test.rb
foreman_puppet-6.1.1 test/helpers/foreman_puppet/puppetclass_lookup_keys_helper_test.rb
foreman_puppet-5.1.3 test/helpers/foreman_puppet/puppetclass_lookup_keys_helper_test.rb
foreman_puppet-6.1.0 test/helpers/foreman_puppet/puppetclass_lookup_keys_helper_test.rb
foreman_puppet-6.0.1 test/helpers/foreman_puppet/puppetclass_lookup_keys_helper_test.rb
foreman_puppet-6.0.0 test/helpers/foreman_puppet/puppetclass_lookup_keys_helper_test.rb
foreman_puppet-5.1.2 test/helpers/foreman_puppet/puppetclass_lookup_keys_helper_test.rb
foreman_puppet-4.1.1 test/helpers/foreman_puppet/puppetclass_lookup_keys_helper_test.rb
foreman_puppet-5.1.1 test/helpers/foreman_puppet/puppetclass_lookup_keys_helper_test.rb
foreman_puppet-5.1.0 test/helpers/foreman_puppet/puppetclass_lookup_keys_helper_test.rb
foreman_puppet-4.1.0 test/helpers/foreman_puppet/puppetclass_lookup_keys_helper_test.rb
foreman_puppet-4.0.4 test/helpers/foreman_puppet/puppetclass_lookup_keys_helper_test.rb
foreman_puppet-5.0.0 test/helpers/foreman_puppet/puppetclass_lookup_keys_helper_test.rb
foreman_puppet-4.0.3 test/helpers/foreman_puppet/puppetclass_lookup_keys_helper_test.rb
foreman_puppet-4.0.2 test/helpers/foreman_puppet/puppetclass_lookup_keys_helper_test.rb
foreman_puppet-3.0.7 test/helpers/foreman_puppet/puppetclass_lookup_keys_helper_test.rb