Commit c1479fef2687c0abf21b65dab6b230cd48cc6968

Authored by Rafael Manzo
1 parent 5e08e4ec

Removing unused reading routes

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
  16 + resources :readings, except: [:index, :show]
17 17 end
18 18  
19 19 #resources :modules
... ...
spec/routing/readings_routing_spec.rb
... ... @@ -8,13 +8,13 @@ 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) }
15 15 it { should route(:put, '/reading_groups/1/readings/1').
16 16 to(controller: :readings, action: :update, reading_group_id: 1, id: 1) }
17   - it { should route(:get, '/reading_groups/1/readings').
  17 + it { should_not route(:get, '/reading_groups/1/readings').
18 18 to(controller: :readings, action: :index, reading_group_id: 1) }
19 19 end
20 20 end
... ...