diff options
author | Raphaël Pinson <raphael.pinson@camptocamp.com> | 2013-04-12 11:18:56 +0200 |
---|---|---|
committer | Raphaël Pinson <raphael.pinson@camptocamp.com> | 2013-04-12 11:18:56 +0200 |
commit | e7cdc4e685a73d05be05ea9d6d0f854c4a3a6ab2 (patch) | |
tree | 244745d2a6b776b56e0d564bf7933c7dfd8e0bad /spec/defines | |
parent | b35e1322d0a791ab22cb2c385ec913492c75026d (diff) | |
download | puppet-dhcp-e7cdc4e685a73d05be05ea9d6d0f854c4a3a6ab2.tar.gz puppet-dhcp-e7cdc4e685a73d05be05ea9d6d0f854c4a3a6ab2.tar.bz2 |
Test working dhcp::shared_network
Diffstat (limited to 'spec/defines')
-rw-r--r-- | spec/defines/dhcp_shared_network_spec.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/defines/dhcp_shared_network_spec.rb b/spec/defines/dhcp_shared_network_spec.rb index ff5a2c5..d59f73c 100644 --- a/spec/defines/dhcp_shared_network_spec.rb +++ b/spec/defines/dhcp_shared_network_spec.rb @@ -37,7 +37,7 @@ describe 'dhcp::shared_network' do :ensure => 'present', :target => '/etc/dhcp/dhcpd.conf' ).with_content( - /shared-network My network/ + /shared-network My network \{\n\}/ ) } end @@ -67,5 +67,15 @@ describe 'dhcp::shared_network' do end context 'when passing subnets' do + let (:params) { { + :subnets => ['1.2.3.4', '5.6.7.8'], + } } + + it { should contain_concat__fragment('dhcp-shared-My network').with( + :ensure => 'present', + :target => '/etc/dhcp/dhcpd.conf' + ).with_content( + /shared-network My network \{\n include "\/etc\/dhcp\/subnets\/1\.2\.3\.4\.conf";\n include "\/etc\/dhcp\/subnets\/5\.6\.7\.8\.conf";\n\}/) + } end end |