@@ -45,6 +45,7 class RoutingRepositoriesTest < ActionController::IntegrationTest | |||||
45 | end |
|
45 | end | |
46 |
|
46 | |||
47 | def test_repositories_revisions |
|
47 | def test_repositories_revisions | |
|
48 | empty_path_param = [] | |||
48 | assert_routing( |
|
49 | assert_routing( | |
49 | { :method => 'get', |
|
50 | { :method => 'get', | |
50 | :path => "/projects/redmine/repository/revisions" }, |
|
51 | :path => "/projects/redmine/repository/revisions" }, | |
@@ -64,6 +65,30 class RoutingRepositoriesTest < ActionController::IntegrationTest | |||||
64 | ) |
|
65 | ) | |
65 | assert_routing( |
|
66 | assert_routing( | |
66 | { :method => 'get', |
|
67 | { :method => 'get', | |
|
68 | :path => "/projects/redmine/repository/revisions/2457/show" }, | |||
|
69 | { :controller => 'repositories', :action => 'show', :id => 'redmine', | |||
|
70 | :path => empty_path_param, :rev => '2457' } | |||
|
71 | ) | |||
|
72 | assert_routing( | |||
|
73 | { :method => 'get', | |||
|
74 | :path => "/projects/redmine/repository/revisions/2457/show/#{@path_hash[:path]}" }, | |||
|
75 | { :controller => 'repositories', :action => 'show', :id => 'redmine', | |||
|
76 | :path => @path_hash[:param] , :rev => '2457'} | |||
|
77 | ) | |||
|
78 | assert_routing( | |||
|
79 | { :method => 'get', | |||
|
80 | :path => "/projects/redmine/repository/revisions/2457/changes" }, | |||
|
81 | { :controller => 'repositories', :action => 'changes', :id => 'redmine', | |||
|
82 | :path => empty_path_param, :rev => '2457' } | |||
|
83 | ) | |||
|
84 | assert_routing( | |||
|
85 | { :method => 'get', | |||
|
86 | :path => "/projects/redmine/repository/revisions/2457/changes/#{@path_hash[:path]}" }, | |||
|
87 | { :controller => 'repositories', :action => 'changes', :id => 'redmine', | |||
|
88 | :path => @path_hash[:param] , :rev => '2457'} | |||
|
89 | ) | |||
|
90 | assert_routing( | |||
|
91 | { :method => 'get', | |||
67 | :path => "/projects/redmine/repository/revisions/2457/diff" }, |
|
92 | :path => "/projects/redmine/repository/revisions/2457/diff" }, | |
68 | { :controller => 'repositories', :action => 'diff', :id => 'redmine', |
|
93 | { :controller => 'repositories', :action => 'diff', :id => 'redmine', | |
69 | :rev => '2457' } |
|
94 | :rev => '2457' } | |
@@ -92,6 +117,12 class RoutingRepositoriesTest < ActionController::IntegrationTest | |||||
92 | { :controller => 'repositories', :action => 'entry', :id => 'redmine', |
|
117 | { :controller => 'repositories', :action => 'entry', :id => 'redmine', | |
93 | :path => @path_hash[:param], :rev => '2', :format => 'raw' } |
|
118 | :path => @path_hash[:param], :rev => '2', :format => 'raw' } | |
94 | ) |
|
119 | ) | |
|
120 | assert_routing( | |||
|
121 | { :method => 'get', | |||
|
122 | :path => "/projects/redmine/repository/revisions/2/annotate/#{@path_hash[:path]}" }, | |||
|
123 | { :controller => 'repositories', :action => 'annotate', :id => 'redmine', | |||
|
124 | :path => @path_hash[:param], :rev => '2' } | |||
|
125 | ) | |||
95 | end |
|
126 | end | |
96 |
|
127 | |||
97 | def test_repositories_non_revisions_path |
|
128 | def test_repositories_non_revisions_path |
General Comments 0
You need to be logged in to leave comments.
Login now