Sha256: edab6ca1de55ee346774a698f795ba099856cfb0efcbbe407cb77dca896bbb3c
Contents?: true
Size: 787 Bytes
Versions: 2
Compression:
Stored size: 787 Bytes
Contents
require 'test_plugin_helper' module ForemanAnsible class FactSparserTest < ActiveSupport::TestCase setup do @original_os_facts = { 'operatingsystem' => { 'major' => 20, 'minor' => 1, 'name' => 'Fedora' } } @sparsed_os_facts = { 'operatingsystem::major' => 20, 'operatingsystem::minor' => 1, 'operatingsystem::name' => 'Fedora' } end test 'sparses simple hash' do assert_equal @sparsed_os_facts, ForemanAnsible::FactSparser.sparse(@original_os_facts) end test 'unsparse simple hash' do assert_equal @original_os_facts, ForemanAnsible::FactSparser.unsparse(@sparsed_os_facts) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
foreman_ansible-1.0 | test/unit/fact_sparser_test.rb |
foreman_ansible-0.3 | test/unit/fact_sparser_test.rb |