diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-31 12:08:33 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-31 12:08:33 +0000 |
commit | 1808454313ed75c92e1384466e8c83bfbc8ae25e (patch) | |
tree | 5c006c158fd796dc6d21e9bd771542f2fb0c24e2 /spec/services/suggestions | |
parent | fd3a95f07ae9cd78fecffcfa5de4494f933a7808 (diff) | |
download | gitlab-ce-1808454313ed75c92e1384466e8c83bfbc8ae25e.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/suggestions')
-rw-r--r-- | spec/services/suggestions/apply_service_spec.rb | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/spec/services/suggestions/apply_service_spec.rb b/spec/services/suggestions/apply_service_spec.rb index 84529af7187..b04c3278eaa 100644 --- a/spec/services/suggestions/apply_service_spec.rb +++ b/spec/services/suggestions/apply_service_spec.rb @@ -57,10 +57,22 @@ describe Suggestions::ApplyService do end context 'is not specified' do - let(:message) { nil } + let(:expected_value) { "Apply suggestion to files/ruby/popen.rb" } - it 'sets default commit message' do - expect(project.repository.commit.message).to eq("Apply suggestion to files/ruby/popen.rb") + context 'is nil' do + let(:message) { nil } + + it 'sets default commit message' do + expect(project.repository.commit.message).to eq(expected_value) + end + end + + context 'is an empty string' do + let(:message) { '' } + + it 'sets default commit message' do + expect(project.repository.commit.message).to eq(expected_value) + end end end |