diff --git a/manifests/resource/mailhost.pp b/manifests/resource/mailhost.pp index f8607da85..34bf54653 100644 --- a/manifests/resource/mailhost.pp +++ b/manifests/resource/mailhost.pp @@ -152,6 +152,7 @@ } concat { $config_file: + ensure => $ensure, owner => 'root', group => $root_group, mode => $nginx::global_mode, diff --git a/spec/defines/resource_mailhost_spec.rb b/spec/defines/resource_mailhost_spec.rb index 1c03b0709..f6812e502 100644 --- a/spec/defines/resource_mailhost_spec.rb +++ b/spec/defines/resource_mailhost_spec.rb @@ -30,6 +30,13 @@ it { is_expected.not_to contain_concat__fragment("#{title}-ssl") } end + describe 'absent assumption' do + let(:params) { default_params.merge('ensure'.to_sym => 'absent') } + + it { is_expected.to contain_class('nginx') } + it { is_expected.to contain_concat("/etc/nginx/conf.mail.d/#{title}.conf").with('ensure' => 'absent') } + end + describe 'mailhost template content' do [ {