diff options
Diffstat (limited to 'spec/routing/uploads_routing_spec.rb')
-rw-r--r-- | spec/routing/uploads_routing_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/routing/uploads_routing_spec.rb b/spec/routing/uploads_routing_spec.rb index 63840b4c30b..c63ca7608c5 100644 --- a/spec/routing/uploads_routing_spec.rb +++ b/spec/routing/uploads_routing_spec.rb @@ -79,6 +79,19 @@ RSpec.describe 'Uploads', 'routing' do end end + context 'for organizations' do + it 'allows fetching organization avatars' do + expect(get('/uploads/-/system/organizations/organization_detail/avatar/1/test.jpg')).to route_to( + controller: 'uploads', + action: 'show', + model: 'organizations/organization_detail', + id: '1', + filename: 'test.jpg', + mounted_as: 'avatar' + ) + end + end + it 'does not allow creating uploads for other models' do unroutable_models = UploadsController::MODEL_CLASSES.keys.compact - %w[personal_snippet user abuse_report] |