Plugins cannot route wiki page sub-path (#12749).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11166 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
3716a5c62f
commit
44ceb513ed
@ -157,7 +157,7 @@ RedmineApp::Application.routes.draw do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
match 'wiki', :controller => 'wiki', :action => 'show', :via => :get
|
match 'wiki', :controller => 'wiki', :action => 'show', :via => :get
|
||||||
get 'wiki/:id/:version', :to => 'wiki#show'
|
get 'wiki/:id/:version', :to => 'wiki#show', :constraints => {:version => /\d+/}
|
||||||
delete 'wiki/:id/:version', :to => 'wiki#destroy_version'
|
delete 'wiki/:id/:version', :to => 'wiki#destroy_version'
|
||||||
get 'wiki/:id/:version/annotate', :to => 'wiki#annotate'
|
get 'wiki/:id/:version/annotate', :to => 'wiki#annotate'
|
||||||
get 'wiki/:id/:version/diff', :to => 'wiki#diff'
|
get 'wiki/:id/:version/diff', :to => 'wiki#diff'
|
||||||
|
@ -53,6 +53,10 @@ class RoutingWikiTest < ActionController::IntegrationTest
|
|||||||
{ :controller => 'wiki', :action => 'annotate', :project_id => '1',
|
{ :controller => 'wiki', :action => 'annotate', :project_id => '1',
|
||||||
:id => 'CookBook_documentation', :version => '2' }
|
:id => 'CookBook_documentation', :version => '2' }
|
||||||
)
|
)
|
||||||
|
# Make sure we don't route wiki page sub-uris to let plugins handle them
|
||||||
|
assert_raise(ActionController::RoutingError) do
|
||||||
|
assert_recognizes({}, {:method => 'get', :path => "/projects/1/wiki/CookBook_documentation/whatever"})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_wiki_misc
|
def test_wiki_misc
|
||||||
|
Loading…
x
Reference in New Issue
Block a user