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

describe 'postfix::mta' do
  let (:facts) { {
Mickaël Canévet's avatar
Mickaël Canévet committed
5
6
    :lsbdistcodename => 'wheezy',
    :osfamily        => 'Debian',
7
    :path            => '/foo/bar',
8
  } }
Mickaël Canévet's avatar
Mickaël Canévet committed
9
10
11
  let :pre_condition do
    "class { 'postfix':
      mydestination => 'bar',
12
      mynetworks    => '127.0.0.1/8, [::1]/128 ![::2]/128',
Mickaël Canévet's avatar
Mickaël Canévet committed
13
14
15
      relayhost     => 'foo',
    }"
  end
16

Raphaël Pinson's avatar
Raphaël Pinson committed
17
  it { is_expected.to contain_postfix__config('mydestination').with_value('bar') }
18
  it { is_expected.to contain_postfix__config('mynetworks').with_value('127.0.0.1/8, [::1]/128 ![::2]/128') }
Raphaël Pinson's avatar
Raphaël Pinson committed
19
  it { is_expected.to contain_postfix__config('relayhost').with_value('foo') }
20
end