2015-09-05 20:36:12 +00:00
|
|
|
# encoding: utf-8
|
2015-10-06 16:55:44 +00:00
|
|
|
# author: Christoph Hartmann
|
|
|
|
# author: Dominik Richter
|
2015-09-05 20:36:12 +00:00
|
|
|
|
|
|
|
require 'helper'
|
2015-10-26 03:04:18 +00:00
|
|
|
require 'inspec/resource'
|
2015-09-05 20:36:12 +00:00
|
|
|
|
2015-10-26 03:04:18 +00:00
|
|
|
describe 'Inspec::Resources::RegistryKey' do
|
2015-09-22 16:31:21 +00:00
|
|
|
let(:resource) { load_resource('registry_key', 'Task Scheduler', 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Schedule') }
|
|
|
|
let(:resource_without_name) { load_resource('registry_key', 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Schedule') }
|
2015-09-05 20:36:12 +00:00
|
|
|
|
2015-09-22 16:33:05 +00:00
|
|
|
it 'read reg key with human readable name' do
|
|
|
|
_(resource.Start).must_equal 2
|
|
|
|
end
|
2015-09-05 20:36:12 +00:00
|
|
|
|
2015-09-22 16:33:05 +00:00
|
|
|
it 'read reg key without human readable name' do
|
|
|
|
_(resource_without_name.Start).must_equal 2
|
2015-09-05 20:36:12 +00:00
|
|
|
end
|
|
|
|
end
|