Sha256: 0361aaafbd4565d00f0b95ff003d5052a625edad65fbae2be185ea419463617d
Contents?: true
Size: 736 Bytes
Versions: 28
Compression:
Stored size: 736 Bytes
Contents
require 'test_puppet_helper' module ForemanPuppet class TemplateRenderingTest < ActiveSupport::TestCase let(:host) { FactoryBot.build_stubbed(:host, :with_puppet_enc) } let(:template) { stub(name: 'Test', template: 'Test') } let(:source) { Foreman::Renderer::Source::Database.new(template) } let(:scope) do Class.new(Foreman::Renderer::Scope::Base) do include Foreman::Renderer::Scope::Macros::HostTemplate end.send(:new, host: host, source: source) end describe '#host_puppet_classes' do test 'should render puppetclasses using host_puppetclasses helper' do assert_equal host.puppet.puppetclasses.pluck(:id), scope.host_puppet_classes.map(&:id) end end end end
Version data entries
28 entries across 28 versions & 1 rubygems