summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-03-22 14:46:41 -0700
committerTim Smith <tsmith@chef.io>2018-03-22 14:56:39 -0700
commit7b7a918a0b60e6c1bc7e5da6947db453f7b6dc4a (patch)
treef22e6314641aa3273f77c43c4a3e4742e7e0fdac /spec
parent63fc9a59b870b1890ed658056d04619467c66710 (diff)
downloadchef-7b7a918a0b60e6c1bc7e5da6947db453f7b6dc4a.tar.gz
Require the domain_name to be a FQDN
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/resource/windows_adjoin.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/unit/resource/windows_adjoin.rb b/spec/unit/resource/windows_adjoin.rb
index bbaec7eaa6..02975d5d4e 100644
--- a/spec/unit/resource/windows_adjoin.rb
+++ b/spec/unit/resource/windows_adjoin.rb
@@ -28,6 +28,10 @@ describe Chef::Resource::WindowsAdJoin do
expect(resource.domain_name).to eql("example.com")
end
+ it "only accepts FQDNs for the domain_name property" do
+ expect { resource.domain_name "example" }.to raise_error(ArgumentError)
+ end
+
it "sets the default action as :join" do
expect(resource.action).to eql([:join])
end