diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-13 09:08:03 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-13 09:08:03 +0000 |
commit | c3ad57034cc1cbd6d0ad02de7ac57f6004440c83 (patch) | |
tree | b27a4424d2d5d930ffdaf1ef872851ce691d4e7a /spec/routing | |
parent | 6ede90f5dd63d4a1f5ba243b4ed5097bb1a0acab (diff) | |
download | gitlab-ce-c3ad57034cc1cbd6d0ad02de7ac57f6004440c83.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/routing')
-rw-r--r-- | spec/routing/uploads_routing_spec.rb | 8 |
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 |