diff --git a/test/integration/routing/repositories_test.rb b/test/integration/routing/repositories_test.rb index 3de354b57..6378fd0bc 100644 --- a/test/integration/routing/repositories_test.rb +++ b/test/integration/routing/repositories_test.rb @@ -29,6 +29,9 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest :path => "/projects/redmine/repository/edit" }, { :controller => 'repositories', :action => 'edit', :id => 'redmine' } ) + end + + def test_repositories_revisions assert_routing( { :method => 'get', :path => "/projects/redmine/repository/revisions" }, @@ -58,18 +61,33 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest { :controller => 'repositories', :action => 'diff', :id => 'redmine', :rev => '2457', :format => 'diff' } ) - assert_routing( - { :method => 'get', - :path => "/projects/redmine/repository/diff/path/to/file.c" }, - { :controller => 'repositories', :action => 'diff', :id => 'redmine', - :path => %w[path to file.c] } - ) assert_routing( { :method => 'get', :path => "/projects/redmine/repository/revisions/2/diff/path/to/file.c" }, { :controller => 'repositories', :action => 'diff', :id => 'redmine', :path => %w[path to file.c], :rev => '2' } ) + assert_routing( + { :method => 'get', + :path => "/projects/redmine/repository/revisions/2/entry/path/to/file.c" }, + { :controller => 'repositories', :action => 'entry', :id => 'redmine', + :path => %w[path to file.c], :rev => '2' } + ) + assert_routing( + { :method => 'get', + :path => "/projects/redmine/repository/revisions/2/raw/path/to/file.c" }, + { :controller => 'repositories', :action => 'entry', :id => 'redmine', + :path => %w[path to file.c], :rev => '2', :format => 'raw' } + ) + end + + def test_repositories_etc + assert_routing( + { :method => 'get', + :path => "/projects/redmine/repository/diff/path/to/file.c" }, + { :controller => 'repositories', :action => 'diff', :id => 'redmine', + :path => %w[path to file.c] } + ) assert_routing( { :method => 'get', :path => "/projects/redmine/repository/browse/path/to/file.c" }, @@ -82,24 +100,12 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest { :controller => 'repositories', :action => 'entry', :id => 'redmine', :path => %w[path to file.c] } ) - assert_routing( - { :method => 'get', - :path => "/projects/redmine/repository/revisions/2/entry/path/to/file.c" }, - { :controller => 'repositories', :action => 'entry', :id => 'redmine', - :path => %w[path to file.c], :rev => '2' } - ) assert_routing( { :method => 'get', :path => "/projects/redmine/repository/raw/path/to/file.c" }, { :controller => 'repositories', :action => 'entry', :id => 'redmine', :path => %w[path to file.c], :format => 'raw' } ) - assert_routing( - { :method => 'get', - :path => "/projects/redmine/repository/revisions/2/raw/path/to/file.c" }, - { :controller => 'repositories', :action => 'entry', :id => 'redmine', - :path => %w[path to file.c], :rev => '2', :format => 'raw' } - ) assert_routing( { :method => 'get', :path => "/projects/redmine/repository/annotate/path/to/file.c" },