BigW Consortium Gitlab

issues_spec.rb 1.26 KB
Newer Older
1 2
require 'spec_helper'

3
feature 'Group issues page' do
4 5
  include FilteredSearchHelpers

6 7 8 9
  let(:path) { issues_group_path(group) }
  let(:issuable) { create(:issue, project: project, title: "this is my created issuable")}

  include_examples 'project features apply to issuables', Issue
10 11 12 13 14 15 16

  context 'rss feed' do
    let(:access_level) { ProjectFeature::ENABLED }

    context 'when signed in' do
      let(:user) { user_in_group }

17 18
      it_behaves_like "it has an RSS button with current_user's RSS token"
      it_behaves_like "an autodiscoverable RSS feed with current_user's RSS token"
19 20 21 22 23
    end

    context 'when signed out' do
      let(:user) { nil }

24 25
      it_behaves_like "it has an RSS button without an RSS token"
      it_behaves_like "an autodiscoverable RSS feed without an RSS token"
26 27
    end
  end
28 29 30 31 32 33 34 35

  context 'assignee', :js do
    let(:access_level) { ProjectFeature::ENABLED }
    let(:user) { user_in_group }
    let(:user2) { user_outside_group }
    let(:path) { issues_group_path(group) }

    it 'filters by only group users' do
36
      filtered_search.set('assignee:')
37

38 39
      expect(find('#js-dropdown-assignee .filter-dropdown')).to have_content(user.name)
      expect(find('#js-dropdown-assignee .filter-dropdown')).not_to have_content(user2.name)
40 41
    end
  end
42
end