From 22c8f66ffaee96ab61465331d0d14636e5312ae6 Mon Sep 17 00:00:00 2001 From: Philipp Toelke Date: Fri, 1 Jul 2016 17:02:30 +0200 Subject: add spec for disable/enable join refs ajjahn/puppet-samba#61 --- spec/classes/samba__server__ads_spec.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 spec/classes/samba__server__ads_spec.rb (limited to 'spec/classes') 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 + -- cgit v1.2.3