Add testcase for simple dhcp interface
1 parent 481e631 commit b1b5fdb8e656f1f8e007e5179799fd2ee7a345a2
@Andreas Jaggi Andreas Jaggi authored on 14 Aug 2012
Showing 1 changed file
View
11
spec/defines/iface_spec.rb
should contain_concat__fragment('interfaces::iface_lo').with_content("iface lo inet loopback\n\t\n\n")
}
end
 
describe 'interfaces::iface' do
let(:title) { 'eth0' }
let(:params) { { :family => 'inet', :method => 'dhcp', :auto => 1 } }
 
it {
should contain_interfaces__auto('eth0')
should contain_concat__fragment('interfaces::iface_eth0').with_target('/etc/network/interfaces')
should contain_concat__fragment('interfaces::iface_eth0').with_content("iface eth0 inet dhcp\n\t\n\n")
}
end