diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-10 03:07:46 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-10 03:07:46 +0000 |
commit | b24ae1cbc66e5b0f622393bcf2c59711750161ea (patch) | |
tree | de9514fdda81f7d8293612687026a87826b0d9dd /spec/models/repository_spec.rb | |
parent | 775816e676aae53509d7b6f364945f2720636f72 (diff) | |
download | gitlab-ce-b24ae1cbc66e5b0f622393bcf2c59711750161ea.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/repository_spec.rb')
-rw-r--r-- | spec/models/repository_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb index 661cbd14427..38f3777c902 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -1331,6 +1331,13 @@ describe Repository do repository.root_ref end + it 'returns nil if the repository does not exist' do + repository = create(:project).repository + + expect(repository).not_to be_exists + expect(repository.root_ref).to be_nil + end + it_behaves_like 'asymmetric cached method', :root_ref end |