Skip to content
Snippets Groups Projects
Commit e321a530 authored by Raphaël Pinson's avatar Raphaël Pinson
Browse files

Fix unit tests

parent b139cac8
No related branches found
No related tags found
No related merge requests found
...@@ -59,7 +59,7 @@ describe 'postfix::config' do ...@@ -59,7 +59,7 @@ describe 'postfix::config' do
:ensure => 'present', :ensure => 'present',
} } } }
it { is_expected.to contain_augeas("set postfix 'foo' to 'bar'").with( it { is_expected.to contain_augeas("manage postfix 'foo'").with(
:incl => '/etc/postfix/main.cf', :incl => '/etc/postfix/main.cf',
:lens => 'Postfix_Main.lns', :lens => 'Postfix_Main.lns',
:changes => "set foo 'bar'" :changes => "set foo 'bar'"
...@@ -72,10 +72,23 @@ describe 'postfix::config' do ...@@ -72,10 +72,23 @@ describe 'postfix::config' do
:ensure => 'absent', :ensure => 'absent',
} } } }
it { is_expected.to contain_augeas("rm postfix 'foo'").with( it { is_expected.to contain_augeas("manage postfix 'foo'").with(
:incl => '/etc/postfix/main.cf', :incl => '/etc/postfix/main.cf',
:lens => 'Postfix_Main.lns', :lens => 'Postfix_Main.lns',
:changes => "rm foo" :changes => "rm foo"
) } ) }
end end
context 'when ensuring blank' do
let (:params) { {
:value => 'bar',
:ensure => 'blank',
} }
it { is_expected.to contain_augeas("manage postfix 'foo'").with(
:incl => '/etc/postfix/main.cf',
:lens => 'Postfix_Main.lns',
:changes => "clear foo"
) }
end
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment