[#808] Add routing for journal diffs

This commit is contained in:
Eric Davis 2011-12-28 13:41:53 -08:00
parent 8100ce0ce5
commit e045306a5c
2 changed files with 6 additions and 1 deletions

View File

@ -95,7 +95,8 @@ ActionController::Routing::Routes.draw do |map|
map.bulk_update_issue 'issues/bulk_edit', :controller => 'issues', :action => 'bulk_update', :conditions => { :method => :post }
map.quoted_issue '/issues/:id/quoted', :controller => 'journals', :action => 'new', :id => /\d+/, :conditions => { :method => :post }
map.connect '/issues/:id/destroy', :controller => 'issues', :action => 'destroy', :conditions => { :method => :post } # legacy
map.journal_diff '/journals/:id/diff/:field', :controller => 'journals', :action => 'diff', :conditions => { :method => :get }
map.resource :gantt, :path_prefix => '/issues', :controller => 'gantts', :only => [:show, :update]
map.resource :gantt, :path_prefix => '/projects/:project_id/issues', :controller => 'gantts', :only => [:show, :update]
map.resource :calendar, :path_prefix => '/issues', :controller => 'calendars', :only => [:show, :update]

View File

@ -109,6 +109,10 @@ class RoutingTest < ActionController::IntegrationTest
should_route :post, "/issues/bulk_edit", :controller => 'issues', :action => 'bulk_update'
end
context "journals" do
should_route :get, "/journals/100/diff/description", :controller => 'journals', :action => 'diff', :id => '100', :field => 'description'
end
context "issue categories" do
should_route :get, "/projects/test/issue_categories/new", :controller => 'issue_categories', :action => 'new', :project_id => 'test'