Skip to content

Commit 9a664a5

Browse files
committed
Add specific testing for to/from
1 parent e6dce06 commit 9a664a5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

spec/octocatalog-diff/tests/cli/options/fact_file_spec.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@
5252
describe '#opt_to_fact_file' do
5353
it 'should distinguish between the to-facts and from-facts' do
5454
fact_file_1 = OctocatalogDiff::Spec.fixture_path('facts/facts.yaml')
55-
fact_file_2 = OctocatalogDiff::Spec.fixture_path('facts/fact-overrides-datatypes.yaml')
56-
result = run_optparse(['--fact-file', fact_file_1, '--to-fact-file', fact_file_2])
55+
fact_file_2 = OctocatalogDiff::Spec.fixture_path('facts/valid-facts.yaml')
56+
result = run_optparse(['--from-fact-file', fact_file_1, '--to-fact-file', fact_file_2])
5757

58-
result_facts_1 = result[:facts].facts
58+
result_facts_1 = result[:from_facts].facts
5959
expect(result_facts_1).to be_a_kind_of(Hash)
6060
expect(result_facts_1['name']).to eq('rspec-node.xyz.github.net')
6161
expect(result_facts_1['values']).to be_a_kind_of(Hash)
@@ -70,6 +70,8 @@
7070
expect(result_facts_2['values']['fqdn']).to eq('rspec-node.xyz.github.net')
7171
expect(result_facts_2['values']['ipaddress']).to eq('10.20.30.40')
7272
expect(result_facts_2['values'].keys).not_to include('expiration')
73+
74+
expect(result[:facts]).to eq(result[:to_facts])
7375
end
7476
end
7577
end

0 commit comments

Comments
 (0)