summaryrefslogtreecommitdiff
path: root/spec/controllers
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2016-08-01 11:13:47 +0100
committerFatih Acet <acetfatih@gmail.com>2016-08-12 23:24:44 +0300
commit99e00856ebb09b8edc9729b7f21a8005aaf02cb3 (patch)
tree8371b4a2a0400ba9741415944d815e4027f8654e /spec/controllers
parentf0bbfe7a62f8005188a46b25184c7f32eb098d14 (diff)
downloadgitlab-ce-99e00856ebb09b8edc9729b7f21a8005aaf02cb3.tar.gz
REMOVE THIS COMMIT: allow undoing last resolution
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/projects/merge_requests_controller_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/controllers/projects/merge_requests_controller_spec.rb b/spec/controllers/projects/merge_requests_controller_spec.rb
index bca5d8c0655..226650399cc 100644
--- a/spec/controllers/projects/merge_requests_controller_spec.rb
+++ b/spec/controllers/projects/merge_requests_controller_spec.rb
@@ -638,6 +638,19 @@ describe Projects::MergeRequestsController do
it 'redirects to the MR show page' do
expect(response).to redirect_to([merge_request_with_conflicts.target_project.namespace.becomes(Namespace), merge_request_with_conflicts.target_project, merge_request_with_conflicts])
end
+
+ context 'undoing the resolution' do
+ before do
+ post :undo_last_resolution,
+ namespace_id: merge_request_with_conflicts.project.namespace.to_param,
+ project_id: merge_request_with_conflicts.project.to_param,
+ id: merge_request_with_conflicts.iid
+ end
+
+ it 'undoes the commit' do
+ expect(original_head_sha).to eq(merge_request_with_conflicts.source_branch_head.sha)
+ end
+ end
end
context 'when sections are missing' do