From bc7d39115fc517f479ce5b81a632c76450fa2241 2014-09-13 10:49:31 From: Jean-Philippe Lang Date: 2014-09-13 10:49:31 Subject: [PATCH] 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 6be563d..c9aea19 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 1f69ddc..6b9afe6 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