diff options
Diffstat (limited to 'spec/models/release_spec.rb')
-rw-r--r-- | spec/models/release_spec.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/spec/models/release_spec.rb b/spec/models/release_spec.rb index e1622888d79..f9c7a14f1f3 100644 --- a/spec/models/release_spec.rb +++ b/spec/models/release_spec.rb @@ -34,7 +34,7 @@ RSpec.describe Release do expect(existing_release_without_name).to be_valid expect(existing_release_without_name.description).to eq("change") - expect(existing_release_without_name.name).to be_nil + expect(existing_release_without_name.name).not_to be_nil end end @@ -129,4 +129,16 @@ RSpec.describe Release do end end end + + describe '#name' do + context 'name is nil' do + before do + release.update(name: nil) + end + + it 'returns tag' do + expect(release.name).to eq(release.tag) + end + end + end end |