Skip to content

Commit

Permalink
test: add show_diff parameter test
Browse files Browse the repository at this point in the history
  • Loading branch information
teluq-pbrideau committed Jul 4, 2024
1 parent e755f3b commit 2ae53f0
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions spec/defines/config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,29 @@
end
end
end

context 'when show_diff is disabled in yum::show_diff' do
let(:title) { 'assumeyes' }
let(:params) { { ensure: '1, 2' } }
let(:pre_condition) { 'class { yum : show_diff => false }' }

it { is_expected.to compile.with_all_deps }

it 'contains an Augeas resource with the correct changes' do
case pkgmgr
when 'yum'
is_expected.to contain_augeas("yum.conf_#{title}").with(
changes: "set assumeyes '1, 2'",
show_diff: false
)
else
is_expected.to contain_augeas("dnf.conf_#{title}").with(
changes: "set assumeyes '1, 2'",
show_diff: false
)
end
end
end
end
end
end
Expand Down

0 comments on commit 2ae53f0

Please sign in to comment.