diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-30 12:07:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-30 12:07:58 +0300 |
commit | 45b4df3e57c949c88107840c44ccbfaf2eabdf26 (patch) | |
tree | f73c1533a75b03d2ceb1361644e0d8ab97568a8f /spec/models/container_repository_spec.rb | |
parent | 7421e6f9f2b5889b05738af7eba568af6ae3fcbc (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/container_repository_spec.rb')
-rw-r--r-- | spec/models/container_repository_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/models/container_repository_spec.rb b/spec/models/container_repository_spec.rb index 5ed812652c5..5bcd9dfd396 100644 --- a/spec/models/container_repository_spec.rb +++ b/spec/models/container_repository_spec.rb @@ -29,6 +29,18 @@ describe ContainerRepository do end end + describe '.exists_by_path?' do + it 'returns true for known container repository paths' do + path = ContainerRegistry::Path.new("#{project.full_path}/#{repository.name}") + expect(described_class.exists_by_path?(path)).to be_truthy + end + + it 'returns false for unknown container repository paths' do + path = ContainerRegistry::Path.new('you/dont/know/me') + expect(described_class.exists_by_path?(path)).to be_falsey + end + end + describe '#tag' do it 'has a test tag' do expect(repository.tag('test')).not_to be_nil |