postfix_mta_spec.rb 694 Bytes
Newer Older
1
2
3
require 'spec_helper'

describe 'postfix::mta' do
Mickaël Canévet's avatar
Mickaël Canévet committed
4
5
6
  let :pre_condition do
    "class { 'postfix':
      mydestination => 'bar',
7
      mynetworks    => '127.0.0.1/8, [::1]/128 ![::2]/128',
Mickaël Canévet's avatar
Mickaël Canévet committed
8
9
10
      relayhost     => 'foo',
    }"
  end
11

12
13
14
15
16
17
18
19
20
21
22
23
  on_supported_os.each do |os, facts|
    context "on #{os}" do
      let(:facts) do
        facts
      end

      it { is_expected.to compile.with_all_deps }
      it { is_expected.to contain_postfix__config('mydestination').with_value('bar') }
      it { is_expected.to contain_postfix__config('mynetworks').with_value('127.0.0.1/8, [::1]/128 ![::2]/128') }
      it { is_expected.to contain_postfix__config('relayhost').with_value('foo') }
    end
  end
24
end