From e045306a5cea6eff1d07004227d38caf06a3394c Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Wed, 28 Dec 2011 13:41:53 -0800 Subject: [PATCH] [#808] Add routing for journal diffs --- config/routes.rb | 3 ++- test/integration/routing_test.rb | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/config/routes.rb b/config/routes.rb index f012ce2a..94094df6 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -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] diff --git a/test/integration/routing_test.rb b/test/integration/routing_test.rb index dc9f0532..abdcc58e 100644 --- a/test/integration/routing_test.rb +++ b/test/integration/routing_test.rb @@ -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'