Commit d8065815 authored by Thong Kuah's avatar Thong Kuah

Merge branch '12737-fix-merge-into-notes-spec' into 'master'

Sorts the expected labels in the note

Closes #12737

See merge request gitlab-org/gitlab-ee!14624
parents 1e902615 166808e4
...@@ -44,11 +44,12 @@ describe ResourceEvents::MergeIntoNotesService do ...@@ -44,11 +44,12 @@ describe ResourceEvents::MergeIntoNotesService do
notes = described_class.new(resource, user).execute notes = described_class.new(resource, user).execute
added_scoped_labels_refs = [scoped_label_group1_2, scoped_label_group2_1, scoped_label_group3_1].map(&:to_reference).sort.join(' ')
removed_scoped_labels_refs = [scoped_label_group1_1, scoped_label_group2_2].map(&:to_reference).sort.join(' ')
expected = [ expected = [
"added #{scoped_label_group1_2.to_reference} #{scoped_label_group2_1.to_reference} " \ "added #{added_scoped_labels_refs} scoped labels " \
"#{scoped_label_group3_1.to_reference} scoped labels " \ "and automatically removed #{removed_scoped_labels_refs} labels",
"and automatically removed " \
"#{scoped_label_group1_1.to_reference} #{scoped_label_group2_2.to_reference} labels",
"added #{label.to_reference} label and removed #{label2.to_reference} label", "added #{label.to_reference} label and removed #{label2.to_reference} label",
"added #{label.to_reference} label", "added #{label.to_reference} label",
"added #{label2.to_reference} label" "added #{label2.to_reference} label"
......
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