summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2015-02-11 14:45:52 -0800
committerJay Mundrawala <jdmundrawala@gmail.com>2015-02-11 14:45:52 -0800
commit1fd482eb48811cb03991530e4382e9cb3e4f17b3 (patch)
tree501fed8c77f8f5b80e553fbc8a384a5f88bc3887
parent8716ec2e4a137f1c568bd523d132b57d947c2352 (diff)
downloadchef-1fd482eb48811cb03991530e4382e9cb3e4f17b3.tar.gz
Added basic spec for get_file_security
-rw-r--r--spec/functional/win32/security_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/functional/win32/security_spec.rb b/spec/functional/win32/security_spec.rb
index 8c3db8e2d2..6709598748 100644
--- a/spec/functional/win32/security_spec.rb
+++ b/spec/functional/win32/security_spec.rb
@@ -35,6 +35,15 @@ describe 'Chef::Win32::Security', :windows_only do
skip "requires user support in mixlib-shellout"
end
+ describe 'get_file_security' do
+ it 'should return a security descriptor when called with a path that exists' do
+ security_descriptor = Chef::ReservedNames::Win32::Security.get_file_security(
+ "C:\\Program Files")
+ # Make sure the security descriptor works
+ expect(security_descriptor.dacl_present?).to be true
+ end
+ end
+
describe 'Chef::Win32::Security::Token' do
let(:token) {
Chef::ReservedNames::Win32::Security.open_process_token(