diff options
author | Gabriel Gizotti <gabriel@gizotti.com> | 2016-11-28 19:48:55 +1000 |
---|---|---|
committer | Gabriel Gizotti <gabriel@gizotti.com> | 2016-12-16 19:13:17 +1000 |
commit | 58609f842e1344579ed14745bb6bcb365059166f (patch) | |
tree | 73fad7acde8d639943efe1c56198f209e6537109 /spec/models/merge_request_spec.rb | |
parent | 512c870ed46b5e441fd0b8daa8bd9cab449f7ac0 (diff) | |
download | gitlab-ce-58609f842e1344579ed14745bb6bcb365059166f.tar.gz |
backend completely drives creation of merge commit message
Diffstat (limited to 'spec/models/merge_request_spec.rb')
-rw-r--r-- | spec/models/merge_request_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/models/merge_request_spec.rb b/spec/models/merge_request_spec.rb index 9ca60e27900..f74c89bba4d 100644 --- a/spec/models/merge_request_spec.rb +++ b/spec/models/merge_request_spec.rb @@ -440,6 +440,20 @@ describe MergeRequest, models: true do expect(request.merge_commit_message).not_to match("Title\n\n\n\n") end + + it 'includes its description in the body' do + request = build(:merge_request, description: 'By removing all code') + + expect(request.merge_commit_message(include_description: true)) + .to match("By removing all code\n\n") + end + + it 'does not includes its description in the body' do + request = build(:merge_request, description: 'By removing all code') + + expect(request.merge_commit_message) + .not_to match("By removing all code\n\n") + end end describe "#reset_merge_when_build_succeeds" do |