diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-05 16:54:15 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-05 16:54:15 +0300 |
commit | be834a25982746ffd85252ff502df42bb88cb9d5 (patch) | |
tree | b4d6a8ba0931e12fac08f05abea33a3b8ec2c8a2 /spec/finders/group_labels_finder_spec.rb | |
parent | ee925a3597f27e92f83a50937a64068109675b3d (diff) |
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc32
Diffstat (limited to 'spec/finders/group_labels_finder_spec.rb')
-rw-r--r-- | spec/finders/group_labels_finder_spec.rb | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/spec/finders/group_labels_finder_spec.rb b/spec/finders/group_labels_finder_spec.rb deleted file mode 100644 index d65a8fb4fed..00000000000 --- a/spec/finders/group_labels_finder_spec.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe GroupLabelsFinder, '#execute' do - let!(:group) { create(:group) } - let!(:user) { create(:user) } - let!(:label1) { create(:group_label, title: 'Foo', description: 'Lorem ipsum', group: group) } - let!(:label2) { create(:group_label, title: 'Bar', description: 'Fusce consequat', group: group) } - - it 'returns all group labels sorted by name if no params' do - result = described_class.new(user, group).execute - - expect(result.to_a).to match_array([label2, label1]) - end - - it 'returns all group labels sorted by name desc' do - result = described_class.new(user, group, sort: 'name_desc').execute - - expect(result.to_a).to match_array([label2, label1]) - end - - it 'returns group labels that match search' do - result = described_class.new(user, group, search: 'Foo').execute - - expect(result.to_a).to match_array([label1]) - end - - it 'returns group labels user subscribed to' do - label2.subscribe(user) - - result = described_class.new(user, group, subscribed: 'true').execute - - expect(result.to_a).to match_array([label2]) - end - - it 'returns second page of labels' do - result = described_class.new(user, group, page: '2').execute - - expect(result.to_a).to match_array([]) - end -end |