From c1479fef2687c0abf21b65dab6b230cd48cc6968 Mon Sep 17 00:00:00 2001 From: Rafael Reggiani Manzo Date: Tue, 7 Jan 2014 15:07:56 -0200 Subject: [PATCH] Removing unused reading routes --- config/routes.rb | 2 +- spec/routing/readings_routing_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/routes.rb b/config/routes.rb index 1e3fc8c..b53ce95 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -13,7 +13,7 @@ Mezuro::Application.routes.draw do end resources :reading_groups do - resources :readings + resources :readings, except: [:index, :show] end #resources :modules diff --git a/spec/routing/readings_routing_spec.rb b/spec/routing/readings_routing_spec.rb index e9e201c..ce643ac 100644 --- a/spec/routing/readings_routing_spec.rb +++ b/spec/routing/readings_routing_spec.rb @@ -8,13 +8,13 @@ describe ReadingsController do to(controller: :readings, action: :new, reading_group_id: 1) } it { should route(:get, '/reading_groups/1/readings/1/edit'). to(controller: :readings, action: :edit, reading_group_id: 1, id: 1) } - it { should route(:get, '/reading_groups/1/readings/1'). + it { should_not route(:get, '/reading_groups/1/readings/1'). to(controller: :readings, action: :show, reading_group_id: 1, id: 1) } it { should route(:delete, '/reading_groups/1/readings/1'). to(controller: :readings, action: :destroy, reading_group_id: 1, id: 1) } it { should route(:put, '/reading_groups/1/readings/1'). to(controller: :readings, action: :update, reading_group_id: 1, id: 1) } - it { should route(:get, '/reading_groups/1/readings'). + it { should_not route(:get, '/reading_groups/1/readings'). to(controller: :readings, action: :index, reading_group_id: 1) } end end -- libgit2 0.21.2