diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-03 21:06:49 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-03 21:06:49 +0300 |
commit | ab7cf450ba19cf80b9534f25dc707b33845e3014 (patch) | |
tree | bbfa6aba83c48aea68d79c4179ce576b6eec326d /spec/features/dashboard | |
parent | 4204cf308596e0e26f578a6e2da88f49c0f4aad9 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/dashboard')
-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 |