diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2016-12-22 15:31:12 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@gitlab.com> | 2017-03-13 10:27:51 +0300 |
commit | 0267b83898d604181e70c5ea8ac4a84108d2e6d6 (patch) | |
tree | 3ce8cc81ba90185c976f3b19b7e548c67856370f /spec/features/issues/create_issue_for_discussions_in_merge_request_spec.rb | |
parent | 9ed3db915026c6e0cd266a1c276386e3e96d2151 (diff) |
Delegate a single discussion to a new issue
Delegate a discussion in a merge request into a new issue.
The discussion wil be marked as resolved and a system note will be
added linking to the newly created issue.
Diffstat (limited to 'spec/features/issues/create_issue_for_discussions_in_merge_request_spec.rb')
-rw-r--r-- | spec/features/issues/create_issue_for_discussions_in_merge_request_spec.rb | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/spec/features/issues/create_issue_for_discussions_in_merge_request_spec.rb b/spec/features/issues/create_issue_for_discussions_in_merge_request_spec.rb index 762cab0c0e1..62ecd0100ae 100644 --- a/spec/features/issues/create_issue_for_discussions_in_merge_request_spec.rb +++ b/spec/features/issues/create_issue_for_discussions_in_merge_request_spec.rb @@ -42,35 +42,13 @@ feature 'Resolving all open discussions in a merge request from an issue', featu page.click_link 'open an issue to resolve them later', href: new_namespace_project_issue_path(project.namespace, project, merge_request_for_resolving_discussions: merge_request.iid) end - it 'shows an issue with the title filled in' do - title_field = page.find_field('issue[title]') - - expect(title_field.value).to include(merge_request.title) - end - - it 'has a mention of the discussion in the description' do - description_field = page.find_field('issue[description]') - - expect(description_field.value).to include(discussion.first_note.note) - end - - it 'has a hidden field for the merge request' do + it 'has a hidden field for the discussion' do merge_request_field = find('#merge_request_for_resolving_discussions', visible: false) expect(merge_request_field.value).to eq(merge_request.iid.to_s) end - it 'can create a new issue for the project' do - expect { click_button 'Submit issue' }.to change { project.issues.reload.size }.by(1) - end - - it 'resolves the discussion in the merge request' do - click_button 'Submit issue' - - discussion.first_note.reload - - expect(discussion.resolved?).to eq(true) - end + it_behaves_like 'creating an issue for a discussion' end end end |