summaryrefslogtreecommitdiff
path: root/spec/functional/resource
diff options
context:
space:
mode:
authorVasu1105 <vasundhara.jagdale@msystechnologies.com>2020-02-26 01:19:01 -0800
committerVasu1105 <vasundhara.jagdale@msystechnologies.com>2020-02-26 01:39:52 -0800
commit11a63c5b61ca1d703b368ddc1caecd7f16fc7e9c (patch)
tree53a0cd66b49b0f7e29fe582ef41c8c6ee7d3d230 /spec/functional/resource
parented559f9687b830648ae6a96d76a040c1fbeef284 (diff)
downloadchef-11a63c5b61ca1d703b368ddc1caecd7f16fc7e9c.tar.gz
More optimization of code and updated get_account_with_user_rights to return account_name with domain
Signed-off-by: Vasu1105 <vasundhara.jagdale@msystechnologies.com>
Diffstat (limited to 'spec/functional/resource')
-rw-r--r--spec/functional/resource/windows_user_privilege_spec.rb6
1 files changed, 4 insertions, 2 deletions
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)