diff options
author | Tor Magnus Rakvåg <tor.magnus@outlook.com> | 2019-10-07 19:12:03 +0200 |
---|---|---|
committer | Tor Magnus Rakvåg <tor.magnus@outlook.com> | 2019-10-07 19:14:09 +0200 |
commit | 2f6c1141bba783b1d5ceb1a29397f28c0a7a02c4 (patch) | |
tree | b29e8cb777a19472fcb5021ab0e5c532d3056253 /spec | |
parent | 44aa430f4e441f6aa11b6eb422cc413aa3b49e6e (diff) | |
download | chef-2f6c1141bba783b1d5ceb1a29397f28c0a7a02c4.tar.gz |
unkown profiles should raise a validation error
Signed-off-by: Tor Magnus Rakvåg <tor.magnus@outlook.com>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/resource/windows_firewall_rule_spec.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/unit/resource/windows_firewall_rule_spec.rb b/spec/unit/resource/windows_firewall_rule_spec.rb index ff6cf776e6..d8d88941c4 100644 --- a/spec/unit/resource/windows_firewall_rule_spec.rb +++ b/spec/unit/resource/windows_firewall_rule_spec.rb @@ -152,6 +152,11 @@ describe Chef::Resource::WindowsFirewallRule do expect(resource.profile).to eql([:notapplicable]) end + it "the profile property raises on any unknown values" do + expect { resource.profile(:other) }.to raise_error(Chef::Exceptions::ValidationFailed) + expect { resource.profile([:public, :other]) }.to raise_error(Chef::Exceptions::ValidationFailed) + end + it "the profile property coerces strings to symbols" do resource.profile("Public") expect(resource.profile).to eql([:public]) |