diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-09 09:06:19 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-09 09:06:19 +0000 |
commit | 3744bcc0d10d24104e39985b6833a0ec51791c0a (patch) | |
tree | ecad3a8435a74bd618acd591762906429f88bfd4 /spec/lib/gitlab/shell_spec.rb | |
parent | 78adf0c5cc2534908e3f16a9b8abf06509444cf3 (diff) | |
download | gitlab-ce-3744bcc0d10d24104e39985b6833a0ec51791c0a.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/shell_spec.rb')
-rw-r--r-- | spec/lib/gitlab/shell_spec.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/lib/gitlab/shell_spec.rb b/spec/lib/gitlab/shell_spec.rb index 55d8bac6c03..ff9e31ec346 100644 --- a/spec/lib/gitlab/shell_spec.rb +++ b/spec/lib/gitlab/shell_spec.rb @@ -422,6 +422,30 @@ describe Gitlab::Shell do end end + describe '#repository_exists?' do + context 'when the storage path does not exist' do + subject { described_class.new.repository_exists?(storage, "non-existing.git") } + + it { is_expected.to be_falsey } + end + + context 'when the repository does not exist' do + let(:project) { create(:project, :repository, :legacy_storage) } + + subject { described_class.new.repository_exists?(storage, "#{project.repository.disk_path}-some-other-repo.git") } + + it { is_expected.to be_falsey } + end + + context 'when the repository exists' do + let(:project) { create(:project, :repository, :legacy_storage) } + + subject { described_class.new.repository_exists?(storage, "#{project.repository.disk_path}.git") } + + it { is_expected.to be_truthy } + end + end + describe '#remove' do it 'removes the namespace' do subject.add_namespace(storage, "mepmep") |