diff options
author | Tim Smith <tsmith@chef.io> | 2018-03-13 16:34:41 -0700 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-03-22 14:13:06 -0700 |
commit | 38b20d0c5bebe3a57d2823d65d717a008c36e1e1 (patch) | |
tree | c9732b5f82f68a270c2cd314b81ee240d432d913 /spec/unit | |
parent | cd8885b42461f7c95f467d0f7c03dcafe9235d02 (diff) | |
download | chef-38b20d0c5bebe3a57d2823d65d717a008c36e1e1.tar.gz |
Add windows_adjoin resource
Copied with permission from John Snow's win_ad cookbook. It's been reworked to not mess with dns servers and use powershell_out + sensitive. Some of those changes are getting pushed upstream, but the name is different and there's no expectation of compatibility here.
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec/unit')
-rw-r--r-- | spec/unit/resource/windows_adjoin.rb | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/spec/unit/resource/windows_adjoin.rb b/spec/unit/resource/windows_adjoin.rb new file mode 100644 index 0000000000..4ce20d5202 --- /dev/null +++ b/spec/unit/resource/windows_adjoin.rb @@ -0,0 +1,34 @@ +# +# Copyright:: Copyright 2018, Chef Software, Inc. +# License:: Apache License, Version 2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require "spec_helper" + +describe Chef::Resource::WindowsAdJoin do + let(:resource) { Chef::Resource::WindowsAdJoin.new("example.com") } + + it "sets resource name as :windows_adjoin" do + expect(resource.resource_name).to eql(:windows_adjoin) + end + + it "sets the domain_name as its name" do + expect(resource.domain_name).to eql("example.com") + end + + it "sets the default action as :join" do + expect(resource.action).to eql([:join]) + end +end |