Refactor : convert queries to REST resources (also fixes #9108).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7649 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Etienne Massip
2011-10-24 20:19:26 +00:00
parent 657fcd97aa
commit 8f96f0c40d
11 changed files with 107 additions and 79 deletions

View File

@@ -218,8 +218,17 @@ class RoutingTest < ActionController::IntegrationTest
should_route :get, "/queries/new", :controller => 'queries', :action => 'new'
should_route :get, "/projects/redmine/queries/new", :controller => 'queries', :action => 'new', :project_id => 'redmine'
should_route :post, "/queries/new", :controller => 'queries', :action => 'new'
should_route :post, "/projects/redmine/queries/new", :controller => 'queries', :action => 'new', :project_id => 'redmine'
should_route :post, "/queries", :controller => 'queries', :action => 'create'
should_route :post, "/projects/redmine/queries", :controller => 'queries', :action => 'create', :project_id => 'redmine'
should_route :get, "/queries/1/edit", :controller => 'queries', :action => 'edit', :id => '1'
should_route :get, "/projects/redmine/queries/1/edit", :controller => 'queries', :action => 'edit', :id => '1', :project_id => 'redmine'
should_route :put, "/queries/1", :controller => 'queries', :action => 'update', :id => '1'
should_route :put, "/projects/redmine/queries/1", :controller => 'queries', :action => 'update', :id => '1', :project_id => 'redmine'
should_route :delete, "/queries/1", :controller => 'queries', :action => 'destroy', :id => '1'
should_route :delete, "/projects/redmine/queries/1", :controller => 'queries', :action => 'destroy', :id => '1', :project_id => 'redmine'
end
context "repositories" do