Commit 6a43e85e authored by Todd Eddy's avatar Todd Eddy
Browse files

Update tests.

parent 100df32a
......@@ -34,6 +34,8 @@ define postfix::config ($value = undef, $ensure = 'present') {
"\$ensure must be either 'present', 'absent' or 'blank', got '${ensure}'")
if ($ensure == 'present') {
validate_string($value)
validate_re($value, '^.+$',
'$value can not be empty if ensure = present')
}
if (!defined(Class['postfix'])) {
......
......@@ -11,7 +11,7 @@ describe 'postfix::config' do
it 'should fail' do
expect {
should contain_augeas("set postfix 'foo'")
}.to raise_error(Puppet::Error, /Must pass value to Postfix::Config/)
}.to raise_error(Puppet::Error, /value can not be empty/)
end
end
......@@ -46,7 +46,7 @@ describe 'postfix::config' do
it 'should fail' do
expect {
should contain_augeas("set postfix 'foo'")
}.to raise_error(Puppet::Error, /must be either 'present' or 'absent'/)
}.to raise_error(Puppet::Error, /must be either 'present', 'absent' or 'blank'/)
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