inspec/test/unit/resources/registry_key_test.rb
Christoph Hartmann 38e982709e update unit test
2015-11-17 22:28:11 +01:00

18 lines
663 B
Ruby

# encoding: utf-8
# author: Christoph Hartmann
# author: Dominik Richter
require 'helper'
require 'inspec/resource'
describe 'Inspec::Resources::RegistryKey' do
it 'read reg key with human readable name' do
resource = MockLoader.new(:windows).load_resource('registry_key', 'Task Scheduler', 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Schedule')
_(resource.Start).must_equal 2
end
it 'read reg key without human readable name' do
resource_without_name = MockLoader.new(:windows).load_resource('registry_key', 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Schedule')
_(resource_without_name.Start).must_equal 2
end
end