Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-13 12:08:03 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-13 12:08:03 +0300
commitc3ad57034cc1cbd6d0ad02de7ac57f6004440c83 (patch)
treeb27a4424d2d5d930ffdaf1ef872851ce691d4e7a /spec/routing
parent6ede90f5dd63d4a1f5ba243b4ed5097bb1a0acab (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/routing')
-rw-r--r--spec/routing/uploads_routing_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/routing/uploads_routing_spec.rb b/spec/routing/uploads_routing_spec.rb
index 42e84774088..f94ae81eeb5 100644
--- a/spec/routing/uploads_routing_spec.rb
+++ b/spec/routing/uploads_routing_spec.rb
@@ -28,4 +28,12 @@ describe 'Uploads', 'routing' do
expect(post("/uploads/#{model}?id=1")).not_to be_routable
end
end
+
+ describe 'legacy paths' do
+ include RSpec::Rails::RequestExampleGroup
+
+ it 'redirects project uploads to canonical path under project namespace' do
+ expect(get('/uploads/namespace/project/12345/test.png')).to redirect_to('/namespace/project/uploads/12345/test.png')
+ end
+ end
end