diff options
| -rw-r--r-- | app/controllers/routes_controller.rb | 3 | ||||
| -rw-r--r-- | config/routes.rb | 2 | ||||
| -rw-r--r-- | spec/routing/routes_routing_spec.rb | 11 |
3 files changed, 16 insertions, 0 deletions
diff --git a/app/controllers/routes_controller.rb b/app/controllers/routes_controller.rb index 7ba2c1a58..6455cb2da 100644 --- a/app/controllers/routes_controller.rb +++ b/app/controllers/routes_controller.rb @@ -69,6 +69,9 @@ class RoutesController < ChouetteController end end + def duplicate + end + # def update # update! do |success, failure| # success.html { redirect_to referential_line_path(@referential,@line) } diff --git a/config/routes.rb b/config/routes.rb index 0ed401cf5..b738c0943 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -110,6 +110,8 @@ ChouetteIhm::Application.routes.draw do member do get 'edit_boarding_alighting' put 'save_boarding_alighting' + get 'duplicate' + post 'duplicate' end resource :journey_patterns_collection, :only => [:show, :update] resources :journey_patterns do diff --git a/spec/routing/routes_routing_spec.rb b/spec/routing/routes_routing_spec.rb new file mode 100644 index 000000000..ca2d3ade9 --- /dev/null +++ b/spec/routing/routes_routing_spec.rb @@ -0,0 +1,11 @@ +RSpec.describe "routes for Routes", type: :routing do + it "routes to /referentials/:id/lines/:id/routes/:id/duplicate" do + expect( + get: '/referentials/:referential_id/lines/:line_id/routes/:id/duplicate' + ).to be_routable + + expect( + post: '/referentials/:referential_id/lines/:line_id/routes/:id/duplicate' + ).to be_routable + end +end |
