inspec/test/functional/inspec_schema_test.rb
Jared Quick 927720998c
Add platforms schema command (#3346)
* Add platforms schema command.
* Add functional test.
* Update tests with sorted export.
* Bump train version.
* Fix syntax in tests.

Signed-off-by: Jared Quick <jquick@chef.io>
2018-09-13 15:36:17 -04:00

21 lines
558 B
Ruby

# encoding: utf-8
require 'functional/helper'
describe 'inspec schema' do
include FunctionalHelper
describe 'extracting the platforms schema export' do
it 'can execute a platforms schema command' do
out = inspec('schema platforms')
out.stderr.must_equal ''
out.exit_status.must_equal 0
data = JSON.parse(out.stdout)
data.class.must_equal Array
data.size.must_be(:>, 1)
data[0]['name'].must_equal 'aix'
families = ['aix', 'unix', 'os']
data[0]['families'].must_equal families
end
end
end