diff options
author | Matt Jankowski <mjankowski@thoughtbot.com> | 2017-05-31 14:27:17 -0400 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-05-31 20:27:17 +0200 |
commit | d6774d2ca39b66ba6a80e707dbd58a6b391ee274 (patch) | |
tree | ee2d1d5f5de480bf9eecca5815f314ee17019395 /spec/routing | |
parent | bd669e390743f98eb8bc777a8a9d01980b7b44b4 (diff) |
Refactor and spec coverage for api/v1/timelines actions (#3482)
Diffstat (limited to 'spec/routing')
-rw-r--r-- | spec/routing/api_routing_spec.rb | 20 | ||||
-rw-r--r-- | spec/routing/api_timelines_spec.rb | 18 |
2 files changed, 20 insertions, 18 deletions
diff --git a/spec/routing/api_routing_spec.rb b/spec/routing/api_routing_spec.rb new file mode 100644 index 000000000..973b4801d --- /dev/null +++ b/spec/routing/api_routing_spec.rb @@ -0,0 +1,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 diff --git a/spec/routing/api_timelines_spec.rb b/spec/routing/api_timelines_spec.rb deleted file mode 100644 index 31717209f..000000000 --- a/spec/routing/api_timelines_spec.rb +++ /dev/null @@ -1,18 +0,0 @@ -require 'rails_helper' - -describe 'API 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 |