Commit 9999fd06 authored by Eugenia Grieff's avatar Eugenia Grieff

Add missing epic notes to cross reference types

- Include relate_epic and unrelate_epic in
SystemNoteMetadata types with cross reference
parent 2929db33
......@@ -14,7 +14,7 @@ module EE
EE_TYPES_WITH_CROSS_REFERENCES = %w[
relate unrelate
epic_issue_added issue_added_to_epic epic_issue_removed issue_removed_from_epic
epic_issue_moved issue_changed_epic
epic_issue_moved issue_changed_epic relate_epic unrelate_epic
].freeze
override :icon_types
......
---
title: Do not show private cross references in epic notes
merge_request:
author:
type: security
......@@ -72,4 +72,17 @@ describe Note do
end
end
end
describe '#cross_reference?' do
[:relate_epic, :unrelate_epic].each do |type|
it "delegates #{type} system note to the cross-reference regex" do
note = create(:note, :system)
create(:system_note_metadata, note: note, action: type)
expect(note).to receive(:matches_cross_reference_regex?).and_return(false)
note.cross_reference?
end
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment