diff options
author | Adam Jahn <ajjahn@gmail.com> | 2016-01-22 12:03:55 -0500 |
---|---|---|
committer | Adam Jahn <ajjahn@gmail.com> | 2016-01-22 12:03:55 -0500 |
commit | 6b84cf51c863034c2dbba12f380bf8e82a529abb (patch) | |
tree | 17641909f729f4980bc5ff10f241f032f98dfa4f /spec/defines/samba__server__user_spec.rb | |
parent | 6d835c44da343f84472f1da2627b350da173050e (diff) | |
parent | 9d63c7be3fa57e4af93c787f8b740658ec14f1f6 (diff) | |
download | puppet-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/samba__server__user_spec.rb')
-rw-r--r-- | spec/defines/samba__server__user_spec.rb | 14 |
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 |