diff options
author | sersut <serdar@opscode.com> | 2013-01-15 11:18:18 -0800 |
---|---|---|
committer | sersut <serdar@opscode.com> | 2013-01-22 10:53:11 -0800 |
commit | d4fe99c6a7ca5a2c5cc9687adb281a580ff2ed73 (patch) | |
tree | 2b25ec08f41a84bb66ecb786cbcd242c1d1faa28 /spec/functional/win32/security_spec.rb | |
parent | 9a83affbd06174cc98755af0641efc9b8b0e2a65 (diff) | |
download | chef-d4fe99c6a7ca5a2c5cc9687adb281a580ff2ed73.tar.gz |
Tests for the windows admin privilege check logic.
Diffstat (limited to 'spec/functional/win32/security_spec.rb')
-rw-r--r-- | spec/functional/win32/security_spec.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/functional/win32/security_spec.rb b/spec/functional/win32/security_spec.rb new file mode 100644 index 0000000000..e1fc7590f3 --- /dev/null +++ b/spec/functional/win32/security_spec.rb @@ -0,0 +1,28 @@ +# +# Author:: Serdar Sutay (<serdar@opscode.com>) +# Copyright:: Copyright (c) 2012 Opscode, Inc. +# License:: Apache License, Version 2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'spec_helper' +if Chef::Platform.windows? + require 'chef/win32/security' +end + +describe 'Chef::Win32::Security', :windows_only do + it "has_admin_privilages? returns true when running as admin" do + Chef::ReservedNames::Win32::Security.has_admin_privilages?.should == true + end +end |