aboutsummaryrefslogtreecommitdiff
path: root/spec/defines
diff options
context:
space:
mode:
authorAdam Jahn <ajjahn@gmail.com>2016-01-22 12:03:55 -0500
committerAdam Jahn <ajjahn@gmail.com>2016-01-22 12:03:55 -0500
commit6b84cf51c863034c2dbba12f380bf8e82a529abb (patch)
tree17641909f729f4980bc5ff10f241f032f98dfa4f /spec/defines
parent6d835c44da343f84472f1da2627b350da173050e (diff)
parent9d63c7be3fa57e4af93c787f8b740658ec14f1f6 (diff)
downloadpuppet-samba-6b84cf51c863034c2dbba12f380bf8e82a529abb.tar.gz
puppet-samba-6b84cf51c863034c2dbba12f380bf8e82a529abb.tar.bz2
Merge pull request #49 from alexjfisher/remove_add_check_user_scripts
Remove add/check user scripts
Diffstat (limited to 'spec/defines')
-rw-r--r--spec/defines/samba__server__user_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/defines/samba__server__user_spec.rb b/spec/defines/samba__server__user_spec.rb
new file mode 100644
index 0000000..c7ae00c
--- /dev/null
+++ b/spec/defines/samba__server__user_spec.rb
@@ -0,0 +1,14 @@
+require 'spec_helper'
+
+describe 'samba::server::user', :type => :define do
+ let(:title) { 'test_user' }
+ let(:params) {{ :password => 'secret' }}
+
+ it { is_expected.to contain_samba__server__user('test_user') }
+ it { is_expected.to contain_exec('add smb account for test_user').with(
+ :command => '/bin/echo -e \'secret\nsecret\n\' | /usr/bin/pdbedit --password-from-stdin -a \'test_user\'',
+ :unless => '/usr/bin/pdbedit \'test_user\'',
+ :require => 'User[test_user]',
+ :notify => 'Class[Samba::Server::Service]'
+ ) }
+end