diff options
author | Rémy Coutable <remy@rymai.me> | 2016-11-03 15:15:03 +0100 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-11-03 18:29:00 +0100 |
commit | 46689162a3902ab294341b5860f16947ed030170 (patch) | |
tree | aa7f74a8630ae5b5e7f6962fcdb5c0fcabbdb07e /spec/features | |
parent | 651bdd7c34c9ebf686b8357d8fc3ca4d0a58792e (diff) | |
download | gitlab-ce-46689162a3902ab294341b5860f16947ed030170.tar.gz |
Ensure merge request's "remove branch" accessors return booleans24102-cannot-unselect-remove-source-branch-when-editing-merge-request
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/merge_requests/edit_mr_spec.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/spec/features/merge_requests/edit_mr_spec.rb b/spec/features/merge_requests/edit_mr_spec.rb index c77e719c5df..c46bd8d449f 100644 --- a/spec/features/merge_requests/edit_mr_spec.rb +++ b/spec/features/merge_requests/edit_mr_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' feature 'Edit Merge Request', feature: true do let(:user) { create(:user) } let(:project) { create(:project, :public) } - let(:merge_request) { create(:merge_request, :with_diffs, source_project: project) } + let(:merge_request) { create(:merge_request, :simple, source_project: project) } before do project.team << [user, :master] @@ -28,5 +28,17 @@ feature 'Edit Merge Request', feature: true do expect(page).to have_content 'Someone edited the merge request the same time you did' end + + it 'allows to unselect "Remove source branch"' do + merge_request.update(merge_params: { 'force_remove_source_branch' => '1' }) + expect(merge_request.merge_params['force_remove_source_branch']).to be_truthy + + visit edit_namespace_project_merge_request_path(project.namespace, project, merge_request) + uncheck 'Remove source branch when merge request is accepted' + + click_button 'Save changes' + + expect(page).to have_content 'Remove source branch' + end end end |