summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorCiro Santilli <ciro.santilli@gmail.com>2014-10-06 23:37:27 +0200
committerCiro Santilli <ciro.santilli@gmail.com>2014-10-07 10:04:09 +0200
commitf4efb19038d01225374c91cca9274cce3d728b3d (patch)
tree0da33ae11e8e17994794f0241b99a428cbe2e8b6 /config
parent70004f4ef6160e788e6a600b9da06608c8559aa2 (diff)
downloadgitlab-ce-f4efb19038d01225374c91cca9274cce3d728b3d.tar.gz
Add tests for tree edit routes
Critical because of possible confusion between /:id/preview and /:id for a path that ends in preview.
Diffstat (limited to 'config')
-rw-r--r--config/routes.rb1
1 files changed, 1 insertions, 0 deletions
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'