diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-09-11 11:28:23 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-09-11 17:15:46 -0700 |
commit | 3643b3254966efd9821fe398a4289f4c52592215 (patch) | |
tree | f0e9b8558d009022da7a47afae7cc15f024709dc /spec | |
parent | 405778e51c3ffde480b6d2e94ec56b7dde9232c5 (diff) | |
download | chef-3643b3254966efd9821fe398a4289f4c52592215.tar.gz |
Allow users to take a String as well
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/resource/windows_user_privilege_spec.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/unit/resource/windows_user_privilege_spec.rb b/spec/unit/resource/windows_user_privilege_spec.rb index 96f9eb93fe..73c800c8bd 100644 --- a/spec/unit/resource/windows_user_privilege_spec.rb +++ b/spec/unit/resource/windows_user_privilege_spec.rb @@ -28,12 +28,17 @@ describe Chef::Resource::WindowsUserPrivilege do expect(resource.principal).to eql("fakey_fakerton") end - it "the principal privilege property coerces to an array" do + it "the users property coerces to an array" do + resource.users "Administrator" + expect(resource.users).to eql(["Administrator"]) + end + + it "the privilege property coerces to an array" do resource.privilege "SeDenyRemoteInteractiveLogonRight" expect(resource.privilege).to eql(["SeDenyRemoteInteractiveLogonRight"]) end - it "the principal privilege validates inputs against the allowed list of privs" do + it "the privilege property validates inputs against the allowed list of privs" do expect { resource.privilege "invalidPriv" }.to raise_error(Chef::Exceptions::ValidationFailed) end |