diff options
Diffstat (limited to 'spec/classes/tftp_spec.rb')
-rw-r--r-- | spec/classes/tftp_spec.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/classes/tftp_spec.rb b/spec/classes/tftp_spec.rb new file mode 100644 index 0000000..3e17286 --- /dev/null +++ b/spec/classes/tftp_spec.rb @@ -0,0 +1,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 |