aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Toelke <pt@philipptoelke.de>2016-07-01 17:02:30 +0200
committerPhilipp Toelke <pt@philipptoelke.de>2016-07-01 17:02:30 +0200
commit22c8f66ffaee96ab61465331d0d14636e5312ae6 (patch)
tree3c89251e5bbf8e2381b84af6aa5bf0f742debaed
parent96e8a1b73f8d0c997fffc090a7b9c4a59f8385eb (diff)
downloadpuppet-samba-22c8f66ffaee96ab61465331d0d14636e5312ae6.tar.gz
puppet-samba-22c8f66ffaee96ab61465331d0d14636e5312ae6.tar.bz2
add spec for disable/enable join
refs ajjahn/puppet-samba#61
-rw-r--r--spec/classes/samba__server__ads_spec.rb19
1 files changed, 19 insertions, 0 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
+