aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJirgn Mssnr <jirgn76@googlemail.com>2016-02-22 13:38:48 +0100
committerJirgn Mssnr <jirgn76@googlemail.com>2016-02-22 13:38:48 +0100
commit6c90437c34e749d42b0041097bd12747d63aad4c (patch)
tree655eb255ba33d42474197973fc8cde2d100fa54f
parentd8c319fb569977afcd54f72ddfe3c6aa2b61a9f1 (diff)
downloadpuppet-samba-6c90437c34e749d42b0041097bd12747d63aad4c.tar.gz
puppet-samba-6c90437c34e749d42b0041097bd12747d63aad4c.tar.bz2
added test for share definition in via samba::server
-rw-r--r--spec/classes/samba__server_spec.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/classes/samba__server_spec.rb b/spec/classes/samba__server_spec.rb
index dbf840a..d19fe6a 100644
--- a/spec/classes/samba__server_spec.rb
+++ b/spec/classes/samba__server_spec.rb
@@ -20,4 +20,24 @@ describe 'samba::server' do
it { should contain_samba__server__option('printing') }
it { should contain_samba__server__option('printcap name') }
it { should contain_samba__server__option('disable spoolss') }
+
+ context 'with hiera shares hash' do
+ let(:params) {{
+ 'shares' => {
+ 'testShare' => {
+ 'path' => '/path/to/some/share',
+ 'browsable' => true,
+ 'writable' => true,
+ 'guest_ok' => true,
+ 'guest_only' => true,
+ },
+ 'testShare2' => {
+ 'path' => '/some/other/path'
+ }
+ }
+ }}
+ it { should contain_samba__server__share( 'testShare' ) }
+ it { should contain_samba__server__share( 'testShare2' ) }
+ end
+
end