From f4efb19038d01225374c91cca9274cce3d728b3d Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Mon, 6 Oct 2014 23:37:27 +0200 Subject: Add tests for tree edit routes Critical because of possible confusion between /:id/preview and /:id for a path that ends in preview. --- config/routes.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'config') diff --git a/config/routes.rb b/config/routes.rb index 2534153758b..c0a970517b6 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -198,6 +198,7 @@ Gitlab::Application.routes.draw do resources :raw, only: [:show], constraints: {id: /.+/} resources :tree, only: [:show], constraints: {id: /.+/, format: /(html|js)/ } resources :edit_tree, only: [:show, :update], constraints: { id: /.+/ }, path: 'edit' do + # Cannot be GET to differentiate from GET paths that end in preview. post :preview, on: :member end resources :new_tree, only: [:show, :update], constraints: {id: /.+/}, path: 'new' -- cgit v1.2.1