@@ -157,7 +157,7 RedmineApp::Application.routes.draw do | |||
|
157 | 157 | end |
|
158 | 158 | end |
|
159 | 159 | match 'wiki', :controller => 'wiki', :action => 'show', :via => :get |
|
160 | get 'wiki/:id/:version', :to => 'wiki#show' | |
|
160 | get 'wiki/:id/:version', :to => 'wiki#show', :constraints => {:version => /\d+/} | |
|
161 | 161 | delete 'wiki/:id/:version', :to => 'wiki#destroy_version' |
|
162 | 162 | get 'wiki/:id/:version/annotate', :to => 'wiki#annotate' |
|
163 | 163 | get 'wiki/:id/:version/diff', :to => 'wiki#diff' |
@@ -53,6 +53,10 class RoutingWikiTest < ActionController::IntegrationTest | |||
|
53 | 53 | { :controller => 'wiki', :action => 'annotate', :project_id => '1', |
|
54 | 54 | :id => 'CookBook_documentation', :version => '2' } |
|
55 | 55 | ) |
|
56 | # Make sure we don't route wiki page sub-uris to let plugins handle them | |
|
57 | assert_raise(ActionController::RoutingError) do | |
|
58 | assert_recognizes({}, {:method => 'get', :path => "/projects/1/wiki/CookBook_documentation/whatever"}) | |
|
59 | end | |
|
56 | 60 | end |
|
57 | 61 | |
|
58 | 62 | def test_wiki_misc |
General Comments 0
You need to be logged in to leave comments.
Login now