From: Jean-Philippe Lang Date: Sat, 13 Sep 2014 10:49:31 +0000 (+0000) Subject: Makes sys#fetch_changesets accept POST requests (#17077). X-Git-Tag: 2.6.0~46 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=bc7d39115fc517f479ce5b81a632c76450fa2241;p=redmine.git Makes sys#fetch_changesets accept POST requests (#17077). git-svn-id: http://svn.redmine.org/redmine/trunk@13392 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/config/routes.rb b/config/routes.rb index 6be563d3f..c9aea1961 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -336,7 +336,7 @@ RedmineApp::Application.routes.draw do match 'sys/projects', :to => 'sys#projects', :via => :get match 'sys/projects/:id/repository', :to => 'sys#create_project_repository', :via => :post - match 'sys/fetch_changesets', :to => 'sys#fetch_changesets', :via => :get + match 'sys/fetch_changesets', :to => 'sys#fetch_changesets', :via => [:get, :post] match 'uploads', :to => 'attachments#upload', :via => :post diff --git a/test/integration/routing/sys_test.rb b/test/integration/routing/sys_test.rb index 1f69ddcc4..6b9afe63b 100644 --- a/test/integration/routing/sys_test.rb +++ b/test/integration/routing/sys_test.rb @@ -31,5 +31,9 @@ class RoutingSysTest < ActionController::IntegrationTest { :method => 'get', :path => "/sys/fetch_changesets" }, { :controller => 'sys', :action => 'fetch_changesets' } ) + assert_routing( + { :method => 'post', :path => "/sys/fetch_changesets" }, + { :controller => 'sys', :action => 'fetch_changesets' } + ) end end