aboutsummaryrefslogtreecommitdiff
path: root/spec/classes
diff options
context:
space:
mode:
Diffstat (limited to 'spec/classes')
-rw-r--r--spec/classes/samba__server__ads_spec.rb19
-rw-r--r--spec/classes/samba__server_spec.rb4
2 files changed, 22 insertions, 1 deletions
diff --git a/spec/classes/samba__server__ads_spec.rb b/spec/classes/samba__server__ads_spec.rb
new file mode 100644
index 0000000..a174bef
--- /dev/null
+++ b/spec/classes/samba__server__ads_spec.rb
@@ -0,0 +1,19 @@
+require 'spec_helper'
+
+describe 'samba::server::ads', :type => :class do
+ let( :facts ) { { :osfamily => 'Debian' } }
+ context "Default config" do
+ it { should contain_exec('join-active-directory') }
+ end
+
+ context "No join" do
+ let ( :params ) { { 'perform_join' => false }}
+ it { should_not contain_exec('join-active-directory') }
+ end
+
+ context "Join 'forced'" do
+ let ( :params ) { { 'perform_join' => true }}
+ it { should contain_exec('join-active-directory') }
+ end
+end
+
diff --git a/spec/classes/samba__server_spec.rb b/spec/classes/samba__server_spec.rb
index 46c5b15..37d5aa8 100644
--- a/spec/classes/samba__server_spec.rb
+++ b/spec/classes/samba__server_spec.rb
@@ -30,19 +30,21 @@ describe 'samba::server' do
'writable' => true,
'guest_ok' => true,
'guest_only' => true,
+ 'msdfs_root' => true,
},
'testShare2' => {
'path' => '/some/other/path'
}
}
}}
- it {
+ it {
should contain_samba__server__share( 'testShare' ).with({
'path' => '/path/to/some/share',
'browsable' => true,
'writable' => true,
'guest_ok' => true,
'guest_only' => true,
+ 'msdfs_root' => true,
})
}
it { should contain_samba__server__share( 'testShare2' ).with_path('/some/other/path') }