Commit 6194db8c authored by Sean McGivern's avatar Sean McGivern

Merge branch '29775-route-changes' into 'master'

Resolve "Follow-up from "Escape route path for LIKE queries""

Closes #29775

See merge request !10137
parents 85ffd85a d618d010
......@@ -215,10 +215,12 @@ describe Namespace, models: true do
end
describe '#descendants' do
let!(:group) { create(:group) }
let!(:group) { create(:group, path: 'git_lab') }
let!(:nested_group) { create(:group, parent: group) }
let!(:deep_nested_group) { create(:group, parent: nested_group) }
let!(:very_deep_nested_group) { create(:group, parent: deep_nested_group) }
let!(:another_group) { create(:group, path: 'gitllab') }
let!(:another_group_nested) { create(:group, path: 'foo', parent: another_group) }
it 'returns the correct descendants' do
expect(very_deep_nested_group.descendants.to_a).to eq([])
......
......@@ -1767,10 +1767,6 @@ describe Project, models: true do
let!(:project3) { create(:empty_project, namespace: create(:namespace, path: 'namespace')) }
let!(:path) { project1.namespace.full_path }
it 'returns 1 project' do
expect(Project.inside_path(path).count).to eq(1)
end
it 'returns correct project' do
expect(Project.inside_path(path)).to eq([project1])
end
......
......@@ -21,10 +21,6 @@ describe Route, models: true do
let!(:similar_group) { create(:group, path: 'gitllab') }
let!(:another_group_nested) { create(:group, path: 'another', name: 'another', parent: similar_group) }
it 'returns 2 routes' do
expect(Route.inside_path('git_lab').count).to eq(2)
end
it 'returns correct routes' do
expect(Route.inside_path('git_lab')).to match_array([nested_group.route, deep_nested_group.route])
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