From 11a63c5b61ca1d703b368ddc1caecd7f16fc7e9c Mon Sep 17 00:00:00 2001 From: Vasu1105 Date: Wed, 26 Feb 2020 01:19:01 -0800 Subject: More optimization of code and updated get_account_with_user_rights to return account_name with domain Signed-off-by: Vasu1105 --- spec/functional/resource/windows_user_privilege_spec.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'spec/functional/resource') diff --git a/spec/functional/resource/windows_user_privilege_spec.rb b/spec/functional/resource/windows_user_privilege_spec.rb index 9bfb1d731e..6dca54016a 100644 --- a/spec/functional/resource/windows_user_privilege_spec.rb +++ b/spec/functional/resource/windows_user_privilege_spec.rb @@ -51,6 +51,8 @@ describe Chef::Resource::WindowsUserPrivilege, :windows_only do let(:privilege) { "SeCreateSymbolicLinkPrivilege" } it "adds user to privilege" do + # Removing so that add update happens + subject.run_action(:remove) subject.run_action(:add) expect(subject).to be_updated_by_last_action end @@ -64,7 +66,7 @@ describe Chef::Resource::WindowsUserPrivilege, :windows_only do context "when privilege is passed as array" do let(:principal) { "Administrator" } - let(:privilege) { ["SeCreateSymbolicLinkPrivilege", "SeCreatePagefilePrivilege"] } + let(:privilege) { %w{SeCreateSymbolicLinkPrivilege SeCreatePagefilePrivilege} } it "adds user to privilege" do subject.run_action(:add) @@ -125,7 +127,7 @@ describe Chef::Resource::WindowsUserPrivilege, :windows_only do end context "when privilege is passed as array" do - let(:privilege) { ["SeCreateSymbolicLinkPrivilege", "SeCreatePagefilePrivilege"] } + let(:privilege) { %w{SeCreateSymbolicLinkPrivilege SeCreatePagefilePrivilege} } it "remove user from privilege" do subject.run_action(:add) subject.run_action(:remove) -- cgit v1.2.1