diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-04-12 21:39:33 +0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-04-12 21:52:03 +0300 |
commit | a64f1c763615c049e551c82a9f3a7c53525a172c (patch) | |
tree | c71a6bbe24f175044b0a66068b6b21b541aabdb1 /spec/controllers | |
parent | 476cf23fc37d6db8d3fb412ce0b646f228d9aac4 (diff) |
Add changelog entry, improve specs and model code
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/projects/merge_requests_controller_spec.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/spec/controllers/projects/merge_requests_controller_spec.rb b/spec/controllers/projects/merge_requests_controller_spec.rb index 0f2cd34132a..c54e83339a1 100644 --- a/spec/controllers/projects/merge_requests_controller_spec.rb +++ b/spec/controllers/projects/merge_requests_controller_spec.rb @@ -159,19 +159,18 @@ describe Projects::MergeRequestsController do describe 'PUT #update' do context 'there is no source project' do - let(:project) { create(:project) } - let(:fork_project) { create(:forked_project_with_submodules) } - let(:merge_request) { create(:merge_request_with_diffs, source_project: fork_project, source_branch: 'add-submodule-version-bump', target_branch: 'master', target_project: project) } + let(:project) { create(:project) } + let(:fork_project) { create(:forked_project_with_submodules) } + let(:merge_request) { create(:merge_request, source_project: fork_project, source_branch: 'add-submodule-version-bump', target_branch: 'master', target_project: project) } before do fork_project.build_forked_project_link(forked_to_project_id: fork_project.id, forked_from_project_id: project.id) fork_project.save merge_request.reload + fork_project.destroy end it 'closes MR without errors' do - fork_project.destroy - post :update, namespace_id: project.namespace.path, project_id: project.path, |