postfix_augeas_spec.rb 984 Bytes
Newer Older
Raphaël Pinson's avatar
Raphaël Pinson committed
1
2
3
require 'spec_helper'

describe 'postfix::augeas' do
4

Mickaël Canévet's avatar
Mickaël Canévet committed
5
6
7
  let :pre_condition do
    "include ::augeas"
  end
Raphaël Pinson's avatar
Raphaël Pinson committed
8

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
  on_supported_os.each do |os, facts|
    context "on #{os}" do
      let(:facts) do
        facts.merge({
          :augeasversion => '1.2.0',
        })
      end

      it { is_expected.to compile.with_all_deps }

      it { is_expected.to contain_augeas__lens('postfix_transport').with({
        :ensure      => 'present',
        :lens_source => 'puppet:///modules/postfix/lenses/postfix_transport.aug',
        :test_source => 'puppet:///modules/postfix/lenses/test_postfix_transport.aug',
        :stock_since => '1.0.0',
      } ) }
      it { is_expected.to contain_augeas__lens('postfix_virtual').with({
        :ensure      => 'present',
        :lens_source => 'puppet:///modules/postfix/lenses/postfix_virtual.aug',
        :test_source => 'puppet:///modules/postfix/lenses/test_postfix_virtual.aug',
        :stock_since => '1.0.0',
      }) }
    end
  end
Raphaël Pinson's avatar
Raphaël Pinson committed
33
end