summaryrefslogtreecommitdiff
path: root/spec/lib/container_registry
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-04-13 09:20:42 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-04-13 09:20:42 +0200
commit259108ada340a0f1d49e2d80d1c433a377983e1c (patch)
tree1373f923b0cb29c83ce9351c183e5196a617e04b /spec/lib/container_registry
parent37ab389139a21a8ab10ddbbddec1b61f720b27ab (diff)
downloadgitlab-ce-259108ada340a0f1d49e2d80d1c433a377983e1c.tar.gz
Fix registry for projects with uppercases in path
Diffstat (limited to 'spec/lib/container_registry')
-rw-r--r--spec/lib/container_registry/path_spec.rb22
1 files changed, 19 insertions, 3 deletions
diff --git a/spec/lib/container_registry/path_spec.rb b/spec/lib/container_registry/path_spec.rb
index b9c4572c269..f3b3a9a715f 100644
--- a/spec/lib/container_registry/path_spec.rb
+++ b/spec/lib/container_registry/path_spec.rb
@@ -33,10 +33,20 @@ describe ContainerRegistry::Path do
end
describe '#to_s' do
- let(:path) { 'some/image' }
+ context 'when path does not have uppercase characters' do
+ let(:path) { 'some/image' }
- it 'return a string with a repository path' do
- expect(subject.to_s).to eq path
+ it 'return a string with a repository path' do
+ expect(subject.to_s).to eq 'some/image'
+ end
+ end
+
+ context 'when path has uppercase characters' do
+ let(:path) { 'SoMe/ImAgE' }
+
+ it 'return a string with a repository path' do
+ expect(subject.to_s).to eq 'some/image'
+ end
end
end
@@ -70,6 +80,12 @@ describe ContainerRegistry::Path do
it { is_expected.to be_valid }
end
+
+ context 'when path contains uppercase letters' do
+ let(:path) { 'Some/Registry' }
+
+ it { is_expected.to be_valid }
+ end
end
describe '#has_repository?' do