From d6774d2ca39b66ba6a80e707dbd58a6b391ee274 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 31 May 2017 14:27:17 -0400 Subject: Refactor and spec coverage for api/v1/timelines actions (#3482) --- spec/routing/api_routing_spec.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 spec/routing/api_routing_spec.rb (limited to 'spec/routing/api_routing_spec.rb') 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 -- cgit