From: Jean-Philippe Lang Date: Sat, 6 Nov 2010 13:22:23 +0000 (+0000) Subject: Fixed: 'View difference' broken on wiki page history (#6747). X-Git-Tag: 1.1.0~203 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6f841b7f436e0c6fa7a491df209d2ae81e3ce54e;p=redmine.git Fixed: 'View difference' broken on wiki page history (#6747). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4372 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/config/routes.rb b/config/routes.rb index b062aea94..3b37b5150 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -149,6 +149,7 @@ ActionController::Routing::Routes.draw do |map| project.wiki_start_page 'wiki', :controller => 'wiki', :action => 'show', :conditions => {:method => :get} project.wiki_index 'wiki/index', :controller => 'wiki', :action => 'index', :conditions => {:method => :get} + project.wiki_diff 'wiki/:id/diff/:version', :controller => 'wiki', :action => 'diff', :version => nil project.wiki_diff 'wiki/:id/diff/:version/vs/:version_from', :controller => 'wiki', :action => 'diff' project.wiki_annotate 'wiki/:id/annotate/:version', :controller => 'wiki', :action => 'annotate' project.resources :wiki, :except => [:new, :create], :member => { diff --git a/test/integration/routing_test.rb b/test/integration/routing_test.rb index 4624e7867..7d467b5d3 100644 --- a/test/integration/routing_test.rb +++ b/test/integration/routing_test.rb @@ -315,6 +315,8 @@ class RoutingTest < ActionController::IntegrationTest should_route :get, "/projects/567/wiki/lalala", :controller => 'wiki', :action => 'show', :project_id => '567', :id => 'lalala' should_route :get, "/projects/567/wiki/my_page/edit", :controller => 'wiki', :action => 'edit', :project_id => '567', :id => 'my_page' should_route :get, "/projects/1/wiki/CookBook_documentation/history", :controller => 'wiki', :action => 'history', :project_id => '1', :id => 'CookBook_documentation' + should_route :get, "/projects/1/wiki/CookBook_documentation/diff", :controller => 'wiki', :action => 'diff', :project_id => '1', :id => 'CookBook_documentation' + should_route :get, "/projects/1/wiki/CookBook_documentation/diff/2", :controller => 'wiki', :action => 'diff', :project_id => '1', :id => 'CookBook_documentation', :version => '2' should_route :get, "/projects/1/wiki/CookBook_documentation/diff/2/vs/1", :controller => 'wiki', :action => 'diff', :project_id => '1', :id => 'CookBook_documentation', :version => '2', :version_from => '1' should_route :get, "/projects/1/wiki/CookBook_documentation/annotate/2", :controller => 'wiki', :action => 'annotate', :project_id => '1', :id => 'CookBook_documentation', :version => '2' should_route :get, "/projects/22/wiki/ladida/rename", :controller => 'wiki', :action => 'rename', :project_id => '22', :id => 'ladida'