Skip to content

Commit 1437c7c

Browse files
committed
Should also filter in the other direction
1 parent 5832a3b commit 1437c7c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

spec/octocatalog-diff/tests/catalog-diff/filter/single_item_array_spec.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,17 @@
3333
result = subject.filtered?(diff_obj)
3434
expect(result).to eq(true)
3535
end
36+
37+
it 'should filter when from-catalog has string and to-catalog has array with that string' do
38+
diff = [
39+
'~',
40+
"File\ffoobar.json",
41+
{ 'parameters' => { 'notify' => ['Service[foo]'] } },
42+
{ 'parameters' => { 'notify' => 'Service[foo]' } }
43+
]
44+
diff_obj = OctocatalogDiff::API::V1::Diff.new(diff)
45+
result = subject.filtered?(diff_obj)
46+
expect(result).to eq(true)
47+
end
3648
end
3749
end

0 commit comments

Comments
 (0)