diff options
Diffstat (limited to 'spec/features/dashboard/milestones_spec.rb')
-rw-r--r-- | spec/features/dashboard/milestones_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/features/dashboard/milestones_spec.rb b/spec/features/dashboard/milestones_spec.rb index c21bc922de7..4ad19710d90 100644 --- a/spec/features/dashboard/milestones_spec.rb +++ b/spec/features/dashboard/milestones_spec.rb @@ -30,6 +30,7 @@ describe 'Dashboard > Milestones' do expect(current_path).to eq dashboard_milestones_path expect(page).to have_content(milestone.title) expect(page).to have_content(group.name) + expect(first('.milestone')).to have_content('Merge Requests') end describe 'new milestones dropdown', :js do @@ -46,4 +47,23 @@ describe 'Dashboard > Milestones' do end end end + + describe 'with merge requests disabled' do + let(:user) { create(:user) } + let(:group) { create(:group) } + let(:project) { create(:project, :merge_requests_disabled, namespace: user.namespace) } + let!(:milestone) { create(:milestone, project: project) } + + before do + group.add_developer(user) + sign_in(user) + visit dashboard_milestones_path + end + + it 'does not see milestones' do + expect(current_path).to eq dashboard_milestones_path + expect(page).to have_content(milestone.title) + expect(first('.milestone')).to have_no_content('Merge Requests') + end + end end |