Commit 7c66ea94 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'remove-order-dependency-in-label-finder-spec' into 'master'

Remove an order dependency in LabelsFinder specs

Makes the LabelsFinder spec expectations order-independent

There is an explicit ordering to `LabelsFinder` - title ascending - but two of the labels (a group label and a project label) have the same title, so the sort ordering isn't stable for those in all circumstances. It looks like this is intentional.

See merge request !7788
parents 1e518c04 9abcb71c
...@@ -17,7 +17,7 @@ describe LabelsFinder do ...@@ -17,7 +17,7 @@ describe LabelsFinder do
let!(:project_label_4) { create(:label, project: project_4, title: 'Label 4') } let!(:project_label_4) { create(:label, project: project_4, title: 'Label 4') }
let!(:project_label_5) { create(:label, project: project_5, title: 'Label 5') } let!(:project_label_5) { create(:label, project: project_5, title: 'Label 5') }
let!(:group_label_1) { create(:group_label, group: group_1, title: 'Label 1') } let!(:group_label_1) { create(:group_label, group: group_1, title: 'Label 1 (group)') }
let!(:group_label_2) { create(:group_label, group: group_1, title: 'Group Label 2') } let!(:group_label_2) { create(:group_label, group: group_1, title: 'Group Label 2') }
let!(:group_label_3) { create(:group_label, group: group_2, title: 'Group Label 3') } let!(:group_label_3) { create(:group_label, group: group_2, title: 'Group Label 3') }
......
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