summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-06-01 20:43:33 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2016-06-01 20:43:33 +0200
commit6e58e7ff7ce151fb7a8329faef69cd3a42194216 (patch)
treeba49009675efc0b3b11a3211f76bc0563072b97c /spec
parent5a377d20d53a2b15229505c0f428f0d9b5925622 (diff)
downloadgitlab-ce-6e58e7ff7ce151fb7a8329faef69cd3a42194216.tar.gz
Use downcased path to container repository as this is expected path by Docker
Diffstat (limited to 'spec')
-rw-r--r--spec/models/project_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index 6c1b0393682..65f06b51794 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -792,6 +792,13 @@ describe Project, models: true do
subject { project.container_registry_repository }
it { is_expected.not_to be_nil }
+
+ context 'for uppercase project path' do
+ let(:project) { create(:empty_project, path: 'PROJECT') }
+
+ it { expect(subject.path).not_to end_with(project.path) }
+ it { expect(subject.path).to end_with(project.path.downcase) }
+ end
end
describe '#container_registry_repository_url' do
@@ -810,6 +817,13 @@ describe Project, models: true do
end
it { is_expected.not_to be_nil }
+
+ context 'for uppercase project path' do
+ let(:project) { create(:empty_project, path: 'PROJECT') }
+
+ it { is_expected.not_to end_with(project.path) }
+ it { is_expected.to end_with(project.path.downcase) }
+ end
end
context 'for disabled registry' do