mirror of
https://github.com/inspec/inspec
synced 2024-11-23 05:03:07 +00:00
Fix json automate render and make the unit tests work. (#3408)
Signed-off-by: Jared Quick <jquick@chef.io>
This commit is contained in:
parent
3e77734645
commit
44c4146a92
2 changed files with 3 additions and 3 deletions
|
@ -10,7 +10,7 @@ module Inspec::Reporters
|
|||
end
|
||||
|
||||
def render
|
||||
output(report_merged.to_json, false)
|
||||
output(report.to_json, false)
|
||||
end
|
||||
|
||||
def report
|
||||
|
|
|
@ -8,7 +8,7 @@ describe Inspec::Reporters::JsonAutomate do
|
|||
data = JSON.parse(File.read(path + '/../mock/reporters/run_data_wrapper.json'), symbolize_names: true)
|
||||
Inspec::Reporters::JsonAutomate.new({ run_data: data })
|
||||
end
|
||||
let(:profiles) { report.report[:profiles] }
|
||||
let(:profiles) { report.send(:profiles) }
|
||||
|
||||
describe '#render' do
|
||||
it 'confirms render output' do
|
||||
|
@ -22,7 +22,7 @@ describe Inspec::Reporters::JsonAutomate do
|
|||
it 'outputs the correct report_merged' do
|
||||
output = File.read(path + '/../mock/reporters/json_merged_output')
|
||||
output = JSON.parse(output, symbolize_names: true)
|
||||
report.report_merged.must_equal output
|
||||
report.report.must_equal output
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in a new issue