about summary refs log tree commit diff
path: root/spec/routing/api_routing_spec.rb
blob: 973b4801d9901e0bc604e651ac460c2e8aba3ea1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require 'rails_helper'

describe 'API routes' do
  describe 'Timeline routes' do
    it 'routes to home timeline' do
      expect(get('/api/v1/timelines/home')).
        to route_to('api/v1/timelines/home#show')
    end

    it 'routes to public timeline' do
      expect(get('/api/v1/timelines/public')).
        to route_to('api/v1/timelines/public#show')
    end

    it 'routes to tag timeline' do
      expect(get('/api/v1/timelines/tag/test')).
        to route_to('api/v1/timelines/tag#show', id: 'test')
    end
  end
end