From 4289ed1d13b9c3b91663581c44635105c4bc0412 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Tue, 23 May 2017 12:11:39 -0400 Subject: Refactor of API timeline actions (#3263) - Increase coverage to exercise all parts of each action - Move into namespace to share common code - Misc refactor of each action for smaller methods, simpler code --- spec/routing/api_timelines_spec.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 spec/routing/api_timelines_spec.rb (limited to 'spec/routing') diff --git a/spec/routing/api_timelines_spec.rb b/spec/routing/api_timelines_spec.rb new file mode 100644 index 000000000..31717209f --- /dev/null +++ b/spec/routing/api_timelines_spec.rb @@ -0,0 +1,18 @@ +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 -- cgit