Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2018-04-24 17:57:35 +0300
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2018-04-25 15:51:04 +0300
commit5cd57cf250e25d99b73fd372716a2719016a34b2 (patch)
tree6541cbdcd7978b5c842ca63ad9bac39afa359d77 /spec
parent5beb4ddebfa23b288dc088c7175c2456d411f4f1 (diff)
Repository#exists? can only be queried with Gitaly
Has been in opt out for 5 months, and within GitLab been in production for longer than that. No code needs to be migrated as this is implemented in GoLang over at Gitaly. Closes https://gitlab.com/gitlab-org/gitaly/issues/314
Diffstat (limited to 'spec')
-rw-r--r--spec/models/repository_spec.rb16
1 files changed, 3 insertions, 13 deletions
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb
index e45fe7db1e7..630b9e0519f 100644
--- a/spec/models/repository_spec.rb
+++ b/spec/models/repository_spec.rb
@@ -1224,15 +1224,15 @@ describe Repository do
end
end
- shared_examples 'repo exists check' do
+ describe '#exists?' do
it 'returns true when a repository exists' do
- expect(repository.exists?).to eq(true)
+ expect(repository.exists?).to be(true)
end
it 'returns false if no full path can be constructed' do
allow(repository).to receive(:full_path).and_return(nil)
- expect(repository.exists?).to eq(false)
+ expect(repository.exists?).to be(false)
end
context 'with broken storage', :broken_storage do
@@ -1242,16 +1242,6 @@ describe Repository do
end
end
- describe '#exists?' do
- context 'when repository_exists is disabled' do
- it_behaves_like 'repo exists check'
- end
-
- context 'when repository_exists is enabled', :skip_gitaly_mock do
- it_behaves_like 'repo exists check'
- end
- end
-
describe '#has_visible_content?' do
before do
# If raw_repository.has_visible_content? gets called more than once then