2015-09-21 07:51:00 +00:00
|
|
|
# encoding: utf-8
|
2015-10-06 16:55:44 +00:00
|
|
|
# author: Christoph Hartmann
|
|
|
|
# author: Dominik Richter
|
2015-09-21 07:51:00 +00:00
|
|
|
|
|
|
|
require 'helper'
|
2015-10-26 03:04:18 +00:00
|
|
|
require 'inspec/resource'
|
2015-09-21 07:51:00 +00:00
|
|
|
|
2015-10-26 03:04:18 +00:00
|
|
|
describe 'Inspec::Resources::JSON' do
|
2015-09-22 16:33:05 +00:00
|
|
|
it 'verify json parsing' do
|
2015-10-12 11:21:50 +00:00
|
|
|
resource = load_resource('json', 'policyfile.lock.json')
|
2015-09-22 16:33:05 +00:00
|
|
|
_(resource.params).wont_equal nil
|
|
|
|
_(resource.send('name')).must_equal 'demo'
|
|
|
|
_(resource.send('run_list')).must_equal %w{apache2 omnibus}
|
|
|
|
_(resource.send('cookbook_locks.omnibus.version')).must_equal '2.2.0'
|
2015-09-21 07:51:00 +00:00
|
|
|
end
|
|
|
|
end
|