diff options
Diffstat (limited to 'spec/routing/api_routing_spec.rb')
-rw-r--r-- | spec/routing/api_routing_spec.rb | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/spec/routing/api_routing_spec.rb b/spec/routing/api_routing_spec.rb index 6c093f19d..2683ccb8d 100644 --- a/spec/routing/api_routing_spec.rb +++ b/spec/routing/api_routing_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'rails_helper' describe 'API routes' do @@ -50,6 +52,36 @@ describe 'API routes' do expect(get('/api/v1/statuses/123/favourited_by')). to route_to('api/v1/statuses/favourited_by_accounts#index', status_id: '123') end + + it 'routes reblog' do + expect(post('/api/v1/statuses/123/reblog')). + to route_to('api/v1/statuses/reblogs#create', status_id: '123') + end + + it 'routes unreblog' do + expect(post('/api/v1/statuses/123/unreblog')). + to route_to('api/v1/statuses/reblogs#destroy', status_id: '123') + end + + it 'routes favourite' do + expect(post('/api/v1/statuses/123/favourite')). + to route_to('api/v1/statuses/favourites#create', status_id: '123') + end + + it 'routes unfavourite' do + expect(post('/api/v1/statuses/123/unfavourite')). + to route_to('api/v1/statuses/favourites#destroy', status_id: '123') + end + + it 'routes mute' do + expect(post('/api/v1/statuses/123/mute')). + to route_to('api/v1/statuses/mutes#create', status_id: '123') + end + + it 'routes unmute' do + expect(post('/api/v1/statuses/123/unmute')). + to route_to('api/v1/statuses/mutes#destroy', status_id: '123') + end end describe 'Timeline routes' do |