Commit 2ee9636b9b3231b13f8594fd52aba9b69318eebd
Committed by
Rafael Manzo
1 parent
11179af9
Exists in
colab
and in
4 other branches
Routing for compound metric configurations.
Showing
5 changed files
with
27 additions
and
5 deletions
Show diff stats
app/controllers/compound_metric_configurations_controller.rb
0 → 100644
config/routes.rb
| ... | ... | @@ -12,10 +12,11 @@ Mezuro::Application.routes.draw do |
| 12 | 12 | |
| 13 | 13 | resources :mezuro_configurations do |
| 14 | 14 | get '/metric_configurations/choose_metric' => 'metric_configurations#choose_metric', as: :choose_metric |
| 15 | - get '/new_compound_metric' => 'metric_configurations#new_compound_metric', as: :new_compound_metric | |
| 16 | 15 | resources :metric_configurations, except: [:update, :new] |
| 17 | 16 | get '/metric_configurations/:metric_name/:base_tool_name/new' => 'metric_configurations#new', as: :new_metric_configuration |
| 18 | 17 | put '/metric_configurations/:id' => 'metric_configurations#update', as: :metric_configuration_update |
| 18 | + | |
| 19 | + resources :compound_metric_configurations | |
| 19 | 20 | end |
| 20 | 21 | |
| 21 | 22 | resources :reading_groups do | ... | ... |
spec/routing/compound_metric_configurations_routing_spec.rb
0 → 100644
| ... | ... | @@ -0,0 +1,20 @@ |
| 1 | +require "spec_helper" | |
| 2 | + | |
| 3 | +describe CompoundMetricConfigurationsController do | |
| 4 | + describe "routing" do | |
| 5 | + it { should route(:get, '/mezuro_configurations/1/compound_metric_configurations/new'). | |
| 6 | + to(controller: :compound_metric_configurations, action: :new, mezuro_configuration_id: "1") } | |
| 7 | + it { should route(:get, '/mezuro_configurations/1/compound_metric_configurations'). | |
| 8 | + to(controller: :compound_metric_configurations, action: :index, mezuro_configuration_id: "1") } | |
| 9 | + it { should route(:post, '/mezuro_configurations/1/compound_metric_configurations'). | |
| 10 | + to(controller: :compound_metric_configurations, action: :create, mezuro_configuration_id: "1") } | |
| 11 | + it { should route(:get, '/mezuro_configurations/1/compound_metric_configurations/1'). | |
| 12 | + to(controller: :compound_metric_configurations, action: :show, mezuro_configuration_id: "1", id: "1") } | |
| 13 | + it { should route(:get, '/mezuro_configurations/1/compound_metric_configurations/1/edit'). | |
| 14 | + to(controller: :compound_metric_configurations, action: :edit, mezuro_configuration_id: "1", id: "1") } | |
| 15 | + it { should route(:put, '/mezuro_configurations/1/compound_metric_configurations/1'). | |
| 16 | + to(controller: :compound_metric_configurations, action: :update, mezuro_configuration_id: "1", id: "1") } | |
| 17 | + it { should route(:delete, '/mezuro_configurations/1/compound_metric_configurations/1'). | |
| 18 | + to(controller: :compound_metric_configurations, action: :destroy, mezuro_configuration_id: "1", id: "1") } | |
| 19 | + end | |
| 20 | +end | ... | ... |
spec/routing/metric_configurations_routing_spec.rb
| ... | ... | @@ -6,8 +6,6 @@ describe MetricConfigurationsController do |
| 6 | 6 | to(controller: :metric_configurations, action: :new, mezuro_configuration_id: "1", metric_name: "LOC", base_tool_name: "Analizo") } |
| 7 | 7 | it { should route(:get, '/mezuro_configurations/1/metric_configurations'). |
| 8 | 8 | to(controller: :metric_configurations, action: :index, mezuro_configuration_id: "1") } |
| 9 | - it { should route(:get, '/mezuro_configurations/1/new_compound_metric'). | |
| 10 | - to(controller: :metric_configurations, action: :new_compound_metric, mezuro_configuration_id: "1") } | |
| 11 | 9 | it { should route(:post, '/mezuro_configurations/1/metric_configurations'). |
| 12 | 10 | to(controller: :metric_configurations, action: :create, mezuro_configuration_id: "1") } |
| 13 | 11 | it { should route(:get, '/mezuro_configurations/1/metric_configurations/1'). |
| ... | ... | @@ -18,5 +16,7 @@ describe MetricConfigurationsController do |
| 18 | 16 | to(controller: :metric_configurations, action: :update, mezuro_configuration_id: "1", id: "1") } |
| 19 | 17 | it { should route(:delete, '/mezuro_configurations/1/metric_configurations/1'). |
| 20 | 18 | to(controller: :metric_configurations, action: :destroy, mezuro_configuration_id: "1", id: "1") } |
| 19 | + it { should route(:get, '/mezuro_configurations/1/metric_configurations/choose_metric'). | |
| 20 | + to(controller: :metric_configurations, action: :choose_metric, mezuro_configuration_id: "1") } | |
| 21 | 21 | end |
| 22 | 22 | end | ... | ... |
spec/routing/mezuro_configuration_routing_spec.rb
| ... | ... | @@ -16,7 +16,5 @@ describe MezuroConfigurationsController do |
| 16 | 16 | to(controller: :mezuro_configurations, action: :update, id: "1") } |
| 17 | 17 | it { should route(:delete, '/mezuro_configurations/1'). |
| 18 | 18 | to(controller: :mezuro_configurations, action: :destroy, id: "1") } |
| 19 | - it { should route(:get, '/mezuro_configurations/1/metric_configurations/choose_metric'). | |
| 20 | - to(controller: :metric_configurations, action: :choose_metric, mezuro_configuration_id: "1") } | |
| 21 | 19 | end |
| 22 | 20 | end | ... | ... |