diff options
Diffstat (limited to 'spec/routing/project_routing_spec.rb')
-rw-r--r-- | spec/routing/project_routing_spec.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/routing/project_routing_spec.rb b/spec/routing/project_routing_spec.rb index 79236b990d0..3a935ddbdd8 100644 --- a/spec/routing/project_routing_spec.rb +++ b/spec/routing/project_routing_spec.rb @@ -680,6 +680,32 @@ RSpec.describe 'project routing' do end end + describe Projects::ReleasesController, 'routing' do + it 'to #latest_permalink with a valid permalink path' do + expect(get('/gitlab/gitlabhq/-/releases/permalink/latest/downloads/release-binary.zip')).to route_to( + 'projects/releases#latest_permalink', + namespace_id: 'gitlab', + project_id: 'gitlabhq', + suffix_path: 'downloads/release-binary.zip' + ) + + expect(get('/gitlab/gitlabhq/-/releases/permalink/latest')).to route_to( + 'projects/releases#latest_permalink', + namespace_id: 'gitlab', + project_id: 'gitlabhq' + ) + end + + it 'to #show for the release with tag named permalink' do + expect(get('/gitlab/gitlabhq/-/releases/permalink')).to route_to( + 'projects/releases#show', + namespace_id: 'gitlab', + project_id: 'gitlabhq', + tag: 'permalink' + ) + end + end + describe Projects::Registry::TagsController, 'routing' do describe '#destroy' do it 'correctly routes to a destroy action' do |