aboutsummaryrefslogtreecommitdiff
path: root/spec/defines
diff options
context:
space:
mode:
authorAdam Jahn <ajjahn@gmail.com>2016-07-10 14:46:15 -0400
committerAdam Jahn <ajjahn@gmail.com>2016-07-10 14:46:15 -0400
commit245503153be7ef32b90b4074707b86a68f99667f (patch)
treef661053b4531186cae949ef6772b3afc572d610a /spec/defines
parentf594999ebe16943d7e3f074fdf3aa70744de1384 (diff)
downloadpuppet-samba-245503153be7ef32b90b4074707b86a68f99667f.tar.gz
puppet-samba-245503153be7ef32b90b4074707b86a68f99667f.tar.bz2
specs for delete readonly option, closes #65
Diffstat (limited to 'spec/defines')
-rw-r--r--spec/defines/samba__server__share_spec.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/defines/samba__server__share_spec.rb b/spec/defines/samba__server__share_spec.rb
index b4182f0..f4665c0 100644
--- a/spec/defines/samba__server__share_spec.rb
+++ b/spec/defines/samba__server__share_spec.rb
@@ -40,6 +40,7 @@ shared_examples "default share" do
set.with("root preexec")
set.with("inherit permissions")
set.with("inherit acls")
+ set.with("delete readonly")
end
let(:change_set) { default_changes }
let(:changes) { change_set.to_a }
@@ -624,6 +625,24 @@ describe 'samba::server::share', :type => :define do
}}
let(:change_set) { default_changes.with("inherit acls", "no") }
end
+
+ context 'with delete_readonly set to true' do
+ include_examples "default share"
+ let(:params) {{
+ :ensure => 'present',
+ :delete_readonly => true,
+ }}
+ let(:change_set) { default_changes.with("delete readonly", "yes") }
+ end
+
+ context 'with delete_readonly set to false' do
+ include_examples "default share"
+ let(:params) {{
+ :ensure => 'present',
+ :delete_readonly => false,
+ }}
+ let(:change_set) { default_changes.with("delete readonly", "no") }
+ end
end
end
end