diff --git a/config/routes.rb b/config/routes.rb index 78cf35c..8d81a66 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, except: [:index, :update] + resources :readings, except: [:index, :update, :show] put '/readings/:id' => 'readings#update', as: :reading_update end diff --git a/spec/routing/readings_routing_spec.rb b/spec/routing/readings_routing_spec.rb index 066ccbc..ce643ac 100644 --- a/spec/routing/readings_routing_spec.rb +++ b/spec/routing/readings_routing_spec.rb @@ -8,7 +8,7 @@ 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) } -- libgit2 0.21.2