aboutsummaryrefslogtreecommitdiff
path: root/spec/classes
diff options
context:
space:
mode:
authorJirgn Mssnr <jirgn76@googlemail.com>2016-02-22 13:47:19 +0100
committerJirgn Mssnr <jirgn76@googlemail.com>2016-02-22 13:47:19 +0100
commit0385193ee30c830e81be53b1d7484ae27cdd2b85 (patch)
tree5b197ac02b82e0ae49041944d2efdd750cdb246e /spec/classes
parent6c90437c34e749d42b0041097bd12747d63aad4c (diff)
downloadpuppet-samba-0385193ee30c830e81be53b1d7484ae27cdd2b85.tar.gz
puppet-samba-0385193ee30c830e81be53b1d7484ae27cdd2b85.tar.bz2
added param users for use in hiera
added tests for samba::server::users
Diffstat (limited to 'spec/classes')
-rw-r--r--spec/classes/samba__server_spec.rb27
1 files changed, 25 insertions, 2 deletions
diff --git a/spec/classes/samba__server_spec.rb b/spec/classes/samba__server_spec.rb
index d19fe6a..46c5b15 100644
--- a/spec/classes/samba__server_spec.rb
+++ b/spec/classes/samba__server_spec.rb
@@ -36,8 +36,31 @@ describe 'samba::server' do
}
}
}}
- it { should contain_samba__server__share( 'testShare' ) }
- it { should contain_samba__server__share( 'testShare2' ) }
+ 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