From 6c90437c34e749d42b0041097bd12747d63aad4c Mon Sep 17 00:00:00 2001 From: Jirgn Mssnr Date: Mon, 22 Feb 2016 13:38:48 +0100 Subject: added test for share definition in via samba::server --- spec/classes/samba__server_spec.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'spec/classes') 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 -- cgit v1.2.3