diff options
author | Luke Duncalfe <lduncalfe@eml.cc> | 2019-07-16 15:31:44 +1200 |
---|---|---|
committer | Luke Duncalfe <lduncalfe@eml.cc> | 2019-09-06 14:18:45 +1200 |
commit | 55ad5423eea6281657e1f7c6630774934f1f26b9 (patch) | |
tree | df72e6ee436c1504e4bbb55b3e1474b84c81087f /spec/models/repository_spec.rb | |
parent | 8e49c2338a4cc9664e5f8fe454077a7a4021240c (diff) | |
download | gitlab-ce-55ad5423eea6281657e1f7c6630774934f1f26b9.tar.gz |
CE-specific changes to allow design repo exports11090-project-export-design-repository-ce
https://gitlab.com/gitlab-org/gitlab-ee/issues/11090
Diffstat (limited to 'spec/models/repository_spec.rb')
-rw-r--r-- | spec/models/repository_spec.rb | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb index 419e1dc2459..b6de5e175dc 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -1075,7 +1075,7 @@ describe Repository do let(:ref) { 'refs/heads/master' } it 'returns nil' do - is_expected.to eq(nil) + is_expected.to be_nil end end @@ -1972,7 +1972,7 @@ describe Repository do it 'returns nil if repo does not exist' do allow(repository).to receive(:root_ref).and_raise(Gitlab::Git::Repository::NoRepository) - expect(repository.avatar).to eq(nil) + expect(repository.avatar).to be_nil end it 'returns the first avatar file found in the repository' do @@ -2623,6 +2623,10 @@ describe Repository do expect { repository.create_if_not_exists }.to change { repository.exists? }.from(false).to(true) end + it 'returns true' do + expect(repository.create_if_not_exists).to eq(true) + end + it 'calls out to the repository client to create a repo' do expect(repository.raw.gitaly_repository_client).to receive(:create_repository) @@ -2637,6 +2641,10 @@ describe Repository do repository.create_if_not_exists end + + it 'returns nil' do + expect(repository.create_if_not_exists).to be_nil + end end context 'when the repository exists but the cache is not up to date' do @@ -2648,6 +2656,10 @@ describe Repository do expect { repository.create_if_not_exists }.not_to raise_error end + + it 'returns nil' do + expect(repository.create_if_not_exists).to be_nil + end end end |