Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ def clear

def contains?(segment_names)
return false if rule_based_segment_names.empty?
return set(segment_names).subset?(rule_based_segment_names)

return segment_names.to_set.subset?(rule_based_segment_names.to_set)
end

private
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
)
end

it 'contains' do
expect(repository.contains?(['foo', 'bar'].to_set)).to eq(true)
expect(repository.contains?(['foo', 'oof'].to_set)).to eq(false)
end

it 'remove undefined matcher with template condition' do
rule_based_segment = { name: 'corge', trafficTypeName: 'tt_name_5', conditions: [
{
Expand Down