##// END OF EJS Templates
Fixed: unified diff link broken on specific file/revision diff (#11325)....
Jean-Philippe Lang -
r9726:1d1aef9d61be
parent child
Show More
@@ -226,6 +226,7 RedmineApp::Application.routes.draw do
226 226 get 'projects/:id/repository/:repository_id/revisions', :to => 'repositories#revisions'
227 227 get 'projects/:id/repository/:repository_id/revisions/:rev/:action(/*path(.:ext))',
228 228 :controller => 'repositories',
229 :format => false,
229 230 :constraints => {
230 231 :action => /(browse|show|entry|raw|annotate|diff)/,
231 232 :rev => /[a-z0-9\.\-_]+/
@@ -244,6 +245,7 RedmineApp::Application.routes.draw do
244 245 delete 'projects/:id/repository/revisions/:rev/issues/:issue_id', :to => 'repositories#remove_related_issue'
245 246 get 'projects/:id/repository/revisions/:rev/:action(/*path(.:ext))',
246 247 :controller => 'repositories',
248 :format => false,
247 249 :constraints => {
248 250 :action => /(browse|show|entry|raw|annotate|diff)/,
249 251 :rev => /[a-z0-9\.\-_]+/
@@ -140,9 +140,11 class RoutingRepositoriesTest < ActionController::IntegrationTest
140 140 )
141 141 assert_routing(
142 142 { :method => 'get',
143 :path => "/projects/redmine/repository/revisions/2457/diff.diff" },
143 :path => "/projects/redmine/repository/revisions/2457/diff" },
144 144 { :controller => 'repositories', :action => 'diff', :id => 'redmine',
145 :rev => '2457', :format => 'diff' }
145 :rev => '2457', :format => 'diff' },
146 {},
147 { :format => 'diff' }
146 148 )
147 149 assert_routing(
148 150 { :method => 'get',
@@ -152,6 +154,14 class RoutingRepositoriesTest < ActionController::IntegrationTest
152 154 )
153 155 assert_routing(
154 156 { :method => 'get',
157 :path => "/projects/redmine/repository/revisions/2/diff/#{@path_hash[:path]}" },
158 { :controller => 'repositories', :action => 'diff', :id => 'redmine',
159 :path => @path_hash[:param], :rev => '2', :format => 'diff' },
160 {},
161 { :format => 'diff' }
162 )
163 assert_routing(
164 { :method => 'get',
155 165 :path => "/projects/redmine/repository/revisions/2/entry/#{@path_hash[:path]}" },
156 166 { :controller => 'repositories', :action => 'entry', :id => 'redmine',
157 167 :path => @path_hash[:param], :rev => '2' }
@@ -209,9 +219,11 class RoutingRepositoriesTest < ActionController::IntegrationTest
209 219 )
210 220 assert_routing(
211 221 { :method => 'get',
212 :path => "/projects/redmine/repository/foo/revisions/2457/diff.diff" },
222 :path => "/projects/redmine/repository/foo/revisions/2457/diff" },
213 223 { :controller => 'repositories', :action => 'diff', :id => 'redmine', :repository_id => 'foo',
214 :rev => '2457', :format => 'diff' }
224 :rev => '2457', :format => 'diff' },
225 {},
226 { :format => 'diff' }
215 227 )
216 228 assert_routing(
217 229 { :method => 'get',
@@ -221,6 +233,14 class RoutingRepositoriesTest < ActionController::IntegrationTest
221 233 )
222 234 assert_routing(
223 235 { :method => 'get',
236 :path => "/projects/redmine/repository/foo/revisions/2/diff/#{@path_hash[:path]}" },
237 { :controller => 'repositories', :action => 'diff', :id => 'redmine', :repository_id => 'foo',
238 :path => @path_hash[:param], :rev => '2', :format => 'diff' },
239 {},
240 { :format => 'diff' }
241 )
242 assert_routing(
243 { :method => 'get',
224 244 :path => "/projects/redmine/repository/foo/revisions/2/entry/#{@path_hash[:path]}" },
225 245 { :controller => 'repositories', :action => 'entry', :id => 'redmine', :repository_id => 'foo',
226 246 :path => @path_hash[:param], :rev => '2' }
General Comments 0
You need to be logged in to leave comments. Login now