summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-02-14 13:52:21 -0800
committerStan Hu <stanhu@gmail.com>2018-02-14 13:52:21 -0800
commit5b3b2b826d20a2f9c7df4a4685eb283acc394cbf (patch)
tree6fa71c0f70184169779d3d399bff9901026584c2 /spec
parentbc11af6758264c7cbebb2c3dccff0f754b3555d8 (diff)
downloadgitlab-ce-5b3b2b826d20a2f9c7df4a4685eb283acc394cbf.tar.gz
Simplify license generator error handling
Diffstat (limited to 'spec')
-rw-r--r--spec/models/repository_spec.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb
index 1b5b746b340..0bc07dc7a85 100644
--- a/spec/models/repository_spec.rb
+++ b/spec/models/repository_spec.rb
@@ -879,11 +879,10 @@ describe Repository do
expect(repository.license_key).to be_nil
end
- it 'returns the license key even when master does not exist' do
+ it 'returns nil when master does not exist' do
repository.rm_branch(user, 'master')
- project.change_head('test')
- expect(repository.license_key).to eq('mit')
+ expect(repository.license_key).to be_nil
end
it 'returns the license key' do