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/support/api | |
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/support/api')
-rw-r--r-- | spec/support/api/issues_resolving_discussions_shared_examples.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/support/api/issues_resolving_discussions_shared_examples.rb b/spec/support/api/issues_resolving_discussions_shared_examples.rb new file mode 100644 index 00000000000..d26d279363c --- /dev/null +++ b/spec/support/api/issues_resolving_discussions_shared_examples.rb @@ -0,0 +1,15 @@ +shared_examples 'creating an issue resolving discussions through the API' do + it 'creates a new project issue' do + expect(response).to have_http_status(:created) + end + + it 'resolves the discussions in a merge request' do + discussion.first_note.reload + + expect(discussion.resolved?).to be(true) + end + + it 'assigns a description to the issue mentioning the merge request' do + expect(json_response['description']).to include(merge_request.to_reference) + end +end |