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

Add tests

parent 51188fa6
No related branches found
No related tags found
No related merge requests found
require 'spec_helper'
describe 'postfix' do
context 'when using defaults' do
context 'when on Debian' do
let (:facts) { {
:operatingsystem => 'Debian',
......@@ -20,6 +21,16 @@ describe 'postfix' do
it { should contain_postfix__config('myorigin') }
it { should contain_postfix__config('alias_maps') }
it { should contain_postfix__config('inet_interfaces') }
it { should contain_mailalias('root') }
it {
should contain_service('postfix').with(
:ensure => 'running',
:enable => 'true',
:hasstatus => 'true',
:restart => '/etc/init.d/postfix reload'
) }
end
context 'when on RedHat' do
......@@ -44,5 +55,16 @@ describe 'postfix' do
it { should contain_postfix__config('sendmail_path') }
it { should contain_postfix__config('newaliases_path') }
it { should contain_postfix__config('mailq_path') }
it { should contain_mailalias('root') }
it {
should contain_service('postfix').with(
:ensure => 'running',
:enable => 'true',
:hasstatus => 'true',
:restart => '/etc/init.d/postfix reload'
) }
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment