Commit e321a530 authored by Raphaël Pinson's avatar Raphaël Pinson
Browse files

Fix unit tests

parent b139cac8
......@@ -59,7 +59,7 @@ describe 'postfix::config' do
: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',
:lens => 'Postfix_Main.lns',
:changes => "set foo 'bar'"
......@@ -72,10 +72,23 @@ describe 'postfix::config' do
: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',
:lens => 'Postfix_Main.lns',
:changes => "rm foo"
) }
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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment