@@ -24,12 +24,19 class RoutingRepositoriesTest < ActionController::IntegrationTest | |||||
24 | :path => "/projects/redmine/repository" }, |
|
24 | :path => "/projects/redmine/repository" }, | |
25 | { :controller => 'repositories', :action => 'show', :id => 'redmine' } |
|
25 | { :controller => 'repositories', :action => 'show', :id => 'redmine' } | |
26 | ) |
|
26 | ) | |
|
27 | ["get", "post"].each do |method| | |||
27 | assert_routing( |
|
28 | assert_routing( | |
28 |
{ :method => |
|
29 | { :method => method, | |
29 | :path => "/projects/redmine/repository/edit" }, |
|
30 | :path => "/projects/redmine/repository/edit" }, | |
30 | { :controller => 'repositories', :action => 'edit', :id => 'redmine' } |
|
31 | { :controller => 'repositories', :action => 'edit', :id => 'redmine' } | |
31 | ) |
|
32 | ) | |
32 | end |
|
33 | end | |
|
34 | assert_routing( | |||
|
35 | { :method => 'get', | |||
|
36 | :path => "/projects/redmine/repository/statistics" }, | |||
|
37 | { :controller => 'repositories', :action => 'stats', :id => 'redmine' } | |||
|
38 | ) | |||
|
39 | end | |||
33 |
|
40 | |||
34 | def test_repositories_revisions |
|
41 | def test_repositories_revisions | |
35 | assert_routing( |
|
42 | assert_routing( | |
@@ -81,7 +88,7 class RoutingRepositoriesTest < ActionController::IntegrationTest | |||||
81 | ) |
|
88 | ) | |
82 | end |
|
89 | end | |
83 |
|
90 | |||
84 |
def test_repositories_ |
|
91 | def test_repositories_non_revisions_path | |
85 | assert_routing( |
|
92 | assert_routing( | |
86 | { :method => 'get', |
|
93 | { :method => 'get', | |
87 | :path => "/projects/redmine/repository/diff/path/to/file.c" }, |
|
94 | :path => "/projects/redmine/repository/diff/path/to/file.c" }, | |
@@ -118,15 +125,5 class RoutingRepositoriesTest < ActionController::IntegrationTest | |||||
118 | { :controller => 'repositories', :action => 'changes', :id => 'redmine', |
|
125 | { :controller => 'repositories', :action => 'changes', :id => 'redmine', | |
119 | :path => %w[path to file.c] } |
|
126 | :path => %w[path to file.c] } | |
120 | ) |
|
127 | ) | |
121 | assert_routing( |
|
|||
122 | { :method => 'get', |
|
|||
123 | :path => "/projects/redmine/repository/statistics" }, |
|
|||
124 | { :controller => 'repositories', :action => 'stats', :id => 'redmine' } |
|
|||
125 | ) |
|
|||
126 | assert_routing( |
|
|||
127 | { :method => 'post', |
|
|||
128 | :path => "/projects/redmine/repository/edit" }, |
|
|||
129 | { :controller => 'repositories', :action => 'edit', :id => 'redmine' } |
|
|||
130 | ) |
|
|||
131 | end |
|
128 | end | |
132 | end |
|
129 | end |
General Comments 0
You need to be logged in to leave comments.
Login now