Skip to content

Commit 1c1c507

Browse files
author
Kevin Paulisse
committed
Update test to use .diff_match?
1 parent 28d3231 commit 1c1c507

1 file changed

Lines changed: 4 additions & 24 deletions

File tree

spec/octocatalog-diff/integration/bootstrap_script_spec.rb

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -92,18 +92,8 @@
9292
end
9393

9494
it 'should contain the added resource' do
95-
answer = [
96-
'+',
97-
"File\f/tmp/foo",
98-
{
99-
'type' => 'File',
100-
'title' => '/tmp/foo',
101-
'tags' => %w(class file test),
102-
'exported' => false,
103-
'parameters' => { 'content' => "Test 123\n" }
104-
}
105-
]
106-
expect(OctocatalogDiff::Spec.array_contains_partial_array?(@result[:diffs], answer)).to eq(true)
95+
resource = { diff_type: '+', type: 'File', title: '/tmp/foo' }
96+
expect(OctocatalogDiff::Spec.diff_match?(@result[:diffs], resource)).to eq(true)
10797
end
10898

10999
it 'should print debugging output from bootstrap script' do
@@ -139,18 +129,8 @@
139129
end
140130

141131
it 'should contain the added resource' do
142-
answer = [
143-
'+',
144-
"File\f/tmp/foo",
145-
{
146-
'type' => 'File',
147-
'title' => '/tmp/foo',
148-
'tags' => %w(class file test),
149-
'exported' => false,
150-
'parameters' => { 'content' => "Test 123\n" }
151-
}
152-
]
153-
expect(OctocatalogDiff::Spec.array_contains_partial_array?(@result[:diffs], answer)).to eq(true)
132+
resource = { diff_type: '+', type: 'File', title: '/tmp/foo' }
133+
expect(OctocatalogDiff::Spec.diff_match?(@result[:diffs], resource)).to eq(true)
154134
end
155135

156136
it 'should not print debugging output from bootstrap script' do

0 commit comments

Comments
 (0)