diff options
author | Adam Jahn <ajjahn@gmail.com> | 2016-02-22 11:44:42 -0500 |
---|---|---|
committer | Adam Jahn <ajjahn@gmail.com> | 2016-02-22 11:44:42 -0500 |
commit | 4c1f7bcca1293ebd0377a0e5d5df310a6f6d4b13 (patch) | |
tree | 96548890cc647005b93bd4b674bf994609350834 /spec/classes/samba__server_spec.rb | |
parent | 3cc71eaac5e120a2b4e5be339b6eb4e3d78349c1 (diff) | |
parent | 0385193ee30c830e81be53b1d7484ae27cdd2b85 (diff) | |
download | puppet-samba-4c1f7bcca1293ebd0377a0e5d5df310a6f6d4b13.tar.gz puppet-samba-4c1f7bcca1293ebd0377a0e5d5df310a6f6d4b13.tar.bz2 |
Merge pull request #54 from jirgn/feature_shares_and_users_via_hiera
Feature shares and users via hiera
Diffstat (limited to 'spec/classes/samba__server_spec.rb')
-rw-r--r-- | spec/classes/samba__server_spec.rb | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/spec/classes/samba__server_spec.rb b/spec/classes/samba__server_spec.rb index dbf840a..46c5b15 100644 --- a/spec/classes/samba__server_spec.rb +++ b/spec/classes/samba__server_spec.rb @@ -20,4 +20,47 @@ 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' ).with({ + 'path' => '/path/to/some/share', + 'browsable' => true, + 'writable' => true, + 'guest_ok' => true, + 'guest_only' => true, + }) + } + it { should contain_samba__server__share( 'testShare2' ).with_path('/some/other/path') } + end + + context 'with hiera users hash' do + let(:params) {{ + 'users' => { + 'testUser' => { + 'password' => 'testpass01' + }, + 'testUser2' => { + 'password' => 'testpass02' + } + } + }} + it { should contain_samba__server__user( 'testUser' ).with_password('testpass01') } + it { should contain_samba__server__user( 'testUser2' ).with_password('testpass02') } + end + end |