summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2015-02-11 14:45:52 -0800
committerBryan McLellan <btm@opscode.com>2015-02-17 09:24:44 -0500
commitee8fd5374754d3dddd296cd1f622f47bc5484b01 (patch)
treea923189ab2d419c0254e1721cb2b29c61a77917d
parent9fbb05e449ba74fd35df40ddbea32efbdeb3f50e (diff)
downloadchef-ee8fd5374754d3dddd296cd1f622f47bc5484b01.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(