diff options
author | Jan Beckmann <king-jan1999@hotmail.de> | 2018-07-02 11:04:43 +0300 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-07-02 11:04:43 +0300 |
commit | 352e322291fe2ebccf055d55b4040677c106b6e1 (patch) | |
tree | e5460461cf9d286ec64a571287045909bfafc45e /spec/features/groups/issues_spec.rb | |
parent | 1de68dc33fc7ed34c7f3d33c6186026c38c5b51a (diff) |
Resolve "404 when trying to create a new issue from the group"
Diffstat (limited to 'spec/features/groups/issues_spec.rb')
-rw-r--r-- | spec/features/groups/issues_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/features/groups/issues_spec.rb b/spec/features/groups/issues_spec.rb index 111a24c0d94..e131ded3688 100644 --- a/spec/features/groups/issues_spec.rb +++ b/spec/features/groups/issues_spec.rb @@ -5,6 +5,7 @@ feature 'Group issues page' do let(:group) { create(:group) } let(:project) { create(:project, :public, group: group)} + let(:project_with_issues_disabled) { create(:project, :issues_disabled, group: group) } let(:path) { issues_group_path(group) } context 'with shared examples' do @@ -76,4 +77,25 @@ feature 'Group issues page' do end end end + + context 'projects with issues disabled' do + describe 'issue dropdown' do + let(:user_in_group) { create(:group_member, :master, user: create(:user), group: group ).user } + + before do + [project, project_with_issues_disabled].each { |project| project.add_master(user_in_group) } + sign_in(user_in_group) + visit issues_group_path(group) + end + + it 'shows projects only with issues feature enabled', :js do + find('.new-project-item-link').click + + page.within('.select2-results') do + expect(page).to have_content(project.full_name) + expect(page).not_to have_content(project_with_issues_disabled.full_name) + end + end + end + end end |