1 require 'spec_helper_acceptance'
2 require_relative './version.rb'
4 describe 'apache::custom_config define', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
5 context 'invalid config' do
6 it 'should not add the config' do
9 apache::custom_config { 'acceptance_test':
14 apply_manifest(pp, :expect_failures => true)
17 describe file("#{$confd_dir}/25-acceptance_test.conf") do
18 it { is_expected.not_to be_file }
22 context 'valid config' do
23 it 'should add the config' do
26 apache::custom_config { 'acceptance_test':
27 content => '# just a comment',
31 apply_manifest(pp, :catch_failures => true)
34 describe file("#{$confd_dir}/25-acceptance_test.conf") do
35 it { is_expected.to contain '# just a comment' }
39 describe 'custom_config without priority prefix' do
40 it 'applies cleanly' do
43 apache::custom_config { 'prefix_test':
45 content => '# just a comment',
48 apply_manifest(pp, :catch_failures => true)
51 describe file("#{$confd_dir}/prefix_test.conf") do
52 it { is_expected.to be_file }