aboutsummaryrefslogtreecommitdiff
path: root/spec/classes/tftp_spec.rb
blob: 3e1728665ebc2154cc31a305f360c9dee41cb2a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
require 'spec_helper'
describe 'tftp', :type => :class do

  describe 'when deploying on debian' do
    let(:facts) { { :operatingsystem => 'Debian',
                    :path            => '/usr/local/bin:/usr/bin:/bin', } }

    it { should contain_file('/etc/default/tftpd-hpa') }
    it { should contain_package('tftpd-hpa') }
    it { should contain_service('tftpd-hpa').with({
      'hasstatus' => false,
      'provider'  => nil,
    }) }
  end

  describe 'when deploying on ubuntu' do
    let(:facts) { { :operatingsystem => 'ubuntu',
                    :path            => '/usr/local/bin:/usr/bin:/bin', } }

    it { should contain_package('tftpd-hpa') }
    it { should contain_file('/etc/default/tftpd-hpa') }
    it { should contain_service('tftpd-hpa').with({
      'hasstatus' => true,
      'provider'  => 'upstart',
    }) }
  end

end