summaryrefslogtreecommitdiff
path: root/spec/routing
diff options
context:
space:
mode:
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