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