@@ -29,6 +29,9 class RoutingRepositoriesTest < ActionController::IntegrationTest | |||||
29 | :path => "/projects/redmine/repository/edit" }, |
|
29 | :path => "/projects/redmine/repository/edit" }, | |
30 | { :controller => 'repositories', :action => 'edit', :id => 'redmine' } |
|
30 | { :controller => 'repositories', :action => 'edit', :id => 'redmine' } | |
31 | ) |
|
31 | ) | |
|
32 | end | |||
|
33 | ||||
|
34 | def test_repositories_revisions | |||
32 | assert_routing( |
|
35 | assert_routing( | |
33 | { :method => 'get', |
|
36 | { :method => 'get', | |
34 | :path => "/projects/redmine/repository/revisions" }, |
|
37 | :path => "/projects/redmine/repository/revisions" }, | |
@@ -60,45 +63,48 class RoutingRepositoriesTest < ActionController::IntegrationTest | |||||
60 | ) |
|
63 | ) | |
61 | assert_routing( |
|
64 | assert_routing( | |
62 | { :method => 'get', |
|
65 | { :method => 'get', | |
63 | :path => "/projects/redmine/repository/diff/path/to/file.c" }, |
|
66 | :path => "/projects/redmine/repository/revisions/2/diff/path/to/file.c" }, | |
64 | { :controller => 'repositories', :action => 'diff', :id => 'redmine', |
|
67 | { :controller => 'repositories', :action => 'diff', :id => 'redmine', | |
65 | :path => %w[path to file.c] } |
|
68 | :path => %w[path to file.c], :rev => '2' } | |
66 | ) |
|
69 | ) | |
67 | assert_routing( |
|
70 | assert_routing( | |
68 | { :method => 'get', |
|
71 | { :method => 'get', | |
69 |
:path => "/projects/redmine/repository/revisions/2/ |
|
72 | :path => "/projects/redmine/repository/revisions/2/entry/path/to/file.c" }, | |
70 |
{ :controller => 'repositories', :action => ' |
|
73 | { :controller => 'repositories', :action => 'entry', :id => 'redmine', | |
71 | :path => %w[path to file.c], :rev => '2' } |
|
74 | :path => %w[path to file.c], :rev => '2' } | |
72 | ) |
|
75 | ) | |
73 | assert_routing( |
|
76 | assert_routing( | |
74 | { :method => 'get', |
|
77 | { :method => 'get', | |
75 |
:path => "/projects/redmine/repository/ |
|
78 | :path => "/projects/redmine/repository/revisions/2/raw/path/to/file.c" }, | |
76 |
{ :controller => 'repositories', :action => ' |
|
79 | { :controller => 'repositories', :action => 'entry', :id => 'redmine', | |
77 | :path => %w[path to file.c] } |
|
80 | :path => %w[path to file.c], :rev => '2', :format => 'raw' } | |
78 | ) |
|
81 | ) | |
|
82 | end | |||
|
83 | ||||
|
84 | def test_repositories_etc | |||
79 | assert_routing( |
|
85 | assert_routing( | |
80 | { :method => 'get', |
|
86 | { :method => 'get', | |
81 |
:path => "/projects/redmine/repository/ |
|
87 | :path => "/projects/redmine/repository/diff/path/to/file.c" }, | |
82 |
{ :controller => 'repositories', :action => ' |
|
88 | { :controller => 'repositories', :action => 'diff', :id => 'redmine', | |
83 | :path => %w[path to file.c] } |
|
89 | :path => %w[path to file.c] } | |
84 | ) |
|
90 | ) | |
85 | assert_routing( |
|
91 | assert_routing( | |
86 | { :method => 'get', |
|
92 | { :method => 'get', | |
87 |
:path => "/projects/redmine/repository/ |
|
93 | :path => "/projects/redmine/repository/browse/path/to/file.c" }, | |
88 |
{ :controller => 'repositories', :action => 'e |
|
94 | { :controller => 'repositories', :action => 'browse', :id => 'redmine', | |
89 |
:path => %w[path to file.c] |
|
95 | :path => %w[path to file.c] } | |
90 | ) |
|
96 | ) | |
91 | assert_routing( |
|
97 | assert_routing( | |
92 | { :method => 'get', |
|
98 | { :method => 'get', | |
93 |
:path => "/projects/redmine/repository/ |
|
99 | :path => "/projects/redmine/repository/entry/path/to/file.c" }, | |
94 | { :controller => 'repositories', :action => 'entry', :id => 'redmine', |
|
100 | { :controller => 'repositories', :action => 'entry', :id => 'redmine', | |
95 |
:path => %w[path to file.c] |
|
101 | :path => %w[path to file.c] } | |
96 | ) |
|
102 | ) | |
97 | assert_routing( |
|
103 | assert_routing( | |
98 | { :method => 'get', |
|
104 | { :method => 'get', | |
99 |
:path => "/projects/redmine/repository/r |
|
105 | :path => "/projects/redmine/repository/raw/path/to/file.c" }, | |
100 | { :controller => 'repositories', :action => 'entry', :id => 'redmine', |
|
106 | { :controller => 'repositories', :action => 'entry', :id => 'redmine', | |
101 |
:path => %w[path to file.c], |
|
107 | :path => %w[path to file.c], :format => 'raw' } | |
102 | ) |
|
108 | ) | |
103 | assert_routing( |
|
109 | assert_routing( | |
104 | { :method => 'get', |
|
110 | { :method => 'get', |
General Comments 0
You need to be logged in to leave comments.
Login now