From 104f3ab01520448d59f2d1eddc82a5c9f28af25d Mon Sep 17 00:00:00 2001 From: Fellipe Souto Sampaio Date: Wed, 15 Jan 2014 15:21:10 -0200 Subject: [PATCH] Change reading route show and its test --- config/routes.rb | 2 +- spec/routing/readings_routing_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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