GitLab wurde aktualisiert. Dank regelmäßiger Updates bleibt das THM GitLab sicher und Sie profitieren von den neuesten Funktionen. Vielen Dank für Ihre Geduld.

Commit 5c92c4dd authored by Grzegorz Bizon's avatar Grzegorz Bizon
Browse files

Improve container registry repository path specs

parent f6a11d00
......@@ -191,13 +191,8 @@
context 'when project exists' do
let(:group) { create(:group, path: 'Some_Group') }
let(:project) do
create(:empty_project, group: group, name: 'some_project')
end
before do
allow(path).to receive(:repository_project)
.and_return(project)
create(:empty_project, group: group, name: 'some_project')
end
context 'when project path equal repository path' do
......@@ -236,21 +231,15 @@
end
context 'when project with uppercase characters in path exists' do
let(:path) { 'somegroup/someproject' }
let(:path) { 'somegroup/myproject/my/image' }
let(:group) { create(:group, path: 'SomeGroup') }
let(:project) do
create(:empty_project, group: group, name: 'SomeProject')
end
before do
allow(path).to receive(:repository_project)
.and_return(project)
create(:empty_project, group: group, name: 'MyProject')
end
it 'returns downcased project path' do
expect(subject.project_path).to eq 'somegroup/someproject'
expect(subject.project_path).to eq 'somegroup/myproject'
end
end
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment