Commit 104f3ab01520448d59f2d1eddc82a5c9f28af25d

Authored by Fellipe Souto Sampaio
Committed by Rafael Manzo
1 parent 073a83da

Change reading route show and its test

Signed-of By: Renan Fichberg <rfichberg@gmail.com>
config/routes.rb
... ... @@ -13,7 +13,7 @@ Mezuro::Application.routes.draw do
13 13 end
14 14  
15 15 resources :reading_groups do
16   - resources :readings, except: [:index, :update]
  16 + resources :readings, except: [:index, :update, :show]
17 17 put '/readings/:id' => 'readings#update', as: :reading_update
18 18 end
19 19  
... ...
spec/routing/readings_routing_spec.rb
... ... @@ -8,7 +8,7 @@ describe ReadingsController do
8 8 to(controller: :readings, action: :new, reading_group_id: 1) }
9 9 it { should route(:get, '/reading_groups/1/readings/1/edit').
10 10 to(controller: :readings, action: :edit, reading_group_id: 1, id: 1) }
11   - it { should route(:get, '/reading_groups/1/readings/1').
  11 + it { should_not route(:get, '/reading_groups/1/readings/1').
12 12 to(controller: :readings, action: :show, reading_group_id: 1, id: 1) }
13 13 it { should route(:delete, '/reading_groups/1/readings/1').
14 14 to(controller: :readings, action: :destroy, reading_group_id: 1, id: 1) }
... ...