diff options
author | Sean McGivern <sean@gitlab.com> | 2019-04-04 18:13:00 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2019-04-04 18:13:00 +0300 |
commit | 349d6b0326286b6ff3831fc0d8c499b42967c6d2 (patch) | |
tree | 06e4841fbd2a048b2efeb310938db32accae9938 /spec/features | |
parent | a6569c31ba4d8ce005f935ee72fc524fbe12a780 (diff) | |
parent | 8bf88876b8198af71bcfa20ae7038b6a6063e406 (diff) |
Merge branch '59570-confidential-quick-action' into 'master'
Extract confidential quick action spec to a shared example
Closes #59570
See merge request gitlab-org/gitlab-ce!26913
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/issues/user_uses_quick_actions_spec.rb | 39 |
1 files changed, 3 insertions, 36 deletions
diff --git a/spec/features/issues/user_uses_quick_actions_spec.rb b/spec/features/issues/user_uses_quick_actions_spec.rb index 362f8a468ec..426e205b30b 100644 --- a/spec/features/issues/user_uses_quick_actions_spec.rb +++ b/spec/features/issues/user_uses_quick_actions_spec.rb @@ -43,6 +43,7 @@ describe 'Issues > User uses quick actions', :js do describe 'issue-only commands' do let(:user) { create(:user) } let(:project) { create(:project, :public) } + let(:issue) { create(:issue, project: project) } before do project.add_maintainer(user) @@ -55,6 +56,8 @@ describe 'Issues > User uses quick actions', :js do wait_for_requests end + it_behaves_like 'confidential quick action' + describe 'adding a due date from note' do let(:issue) { create(:issue, project: project) } @@ -137,42 +140,6 @@ describe 'Issues > User uses quick actions', :js do end end - describe 'make issue confidential' do - let(:issue) { create(:issue, project: project) } - let(:original_issue) { create(:issue, project: project) } - - context 'when the current user can update issues' do - it 'does not create a note, and marks the issue as confidential' do - add_note("/confidential") - - expect(page).not_to have_content "/confidential" - expect(page).to have_content 'Commands applied' - expect(page).to have_content "made the issue confidential" - - expect(issue.reload).to be_confidential - end - end - - context 'when the current user cannot update the issue' do - let(:guest) { create(:user) } - before do - project.add_guest(guest) - gitlab_sign_out - sign_in(guest) - visit project_issue_path(project, issue) - end - - it 'does not create a note, and does not mark the issue as confidential' do - add_note("/confidential") - - expect(page).not_to have_content 'Commands applied' - expect(page).not_to have_content "made the issue confidential" - - expect(issue.reload).not_to be_confidential - end - end - end - describe 'move the issue to another project' do let(:issue) { create(:issue, project: project) } |