diff options
author | Sean McGivern <sean@gitlab.com> | 2018-08-21 12:53:43 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2018-08-21 13:41:25 +0300 |
commit | 5759bfe029b5abb1c3550f702fc5a66da21cfa56 (patch) | |
tree | 3a18d630e8eca69139d5e009547193d50944954b /spec/models/commit_spec.rb | |
parent | e3f13c9e0a121ef8ed9d60f7239f70d3d0e7815f (diff) |
Make it clearer when Commit#description returns no_commit_message
Diffstat (limited to 'spec/models/commit_spec.rb')
-rw-r--r-- | spec/models/commit_spec.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/models/commit_spec.rb b/spec/models/commit_spec.rb index ab241b83077..d5f88e930d4 100644 --- a/spec/models/commit_spec.rb +++ b/spec/models/commit_spec.rb @@ -225,11 +225,12 @@ eos end describe 'description' do - it "returns no_commit_message when safe_message is blank" do - allow(commit).to receive(:safe_message).and_return('') - expect(commit.description).to eq("--no commit message") + it 'returns no_commit_message when safe_message is blank' do + allow(commit).to receive(:safe_message).and_return(nil) + + expect(commit.description).to eq('--no commit message') end - + it 'returns description of commit message if title less than 100 characters' do message = <<eos Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sodales id felis id blandit. |