##// END OF EJS Templates
test: route: move versions test in projects test to routing/versions_test.rb...
Toshi MARUYAMA -
r8231:4b8ceb51e210
parent child
Show More
@@ -1,109 +1,113
1 # Redmine - project management software
1 # Redmine - project management software
2 # Copyright (C) 2006-2011 Jean-Philippe Lang
2 # Copyright (C) 2006-2011 Jean-Philippe Lang
3 #
3 #
4 # This program is free software; you can redistribute it and/or
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
7 # of the License, or (at your option) any later version.
8 #
8 #
9 # This program is distributed in the hope that it will be useful,
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
12 # GNU General Public License for more details.
13 #
13 #
14 # You should have received a copy of the GNU General Public License
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
17
18 require File.expand_path('../../../test_helper', __FILE__)
18 require File.expand_path('../../../test_helper', __FILE__)
19
19
20 class RoutingVersionsTest < ActionController::IntegrationTest
20 class RoutingVersionsTest < ActionController::IntegrationTest
21 def test_versions
21 def test_versions
22 # /projects/foo/versions is /projects/foo/roadmap
22 # /projects/foo/versions is /projects/foo/roadmap
23 assert_routing(
23 assert_routing(
24 { :method => 'get', :path => "/projects/33/roadmap" },
25 { :controller => 'versions', :action => 'index', :project_id => '33' }
26 )
27 assert_routing(
24 { :method => 'get', :path => "/projects/foo/versions.xml" },
28 { :method => 'get', :path => "/projects/foo/versions.xml" },
25 { :controller => 'versions', :action => 'index',
29 { :controller => 'versions', :action => 'index',
26 :project_id => 'foo', :format => 'xml' }
30 :project_id => 'foo', :format => 'xml' }
27 )
31 )
28 assert_routing(
32 assert_routing(
29 { :method => 'get', :path => "/projects/foo/versions.json" },
33 { :method => 'get', :path => "/projects/foo/versions.json" },
30 { :controller => 'versions', :action => 'index',
34 { :controller => 'versions', :action => 'index',
31 :project_id => 'foo', :format => 'json' }
35 :project_id => 'foo', :format => 'json' }
32 )
36 )
33 assert_routing(
37 assert_routing(
34 { :method => 'get', :path => "/projects/foo/versions/new" },
38 { :method => 'get', :path => "/projects/foo/versions/new" },
35 { :controller => 'versions', :action => 'new',
39 { :controller => 'versions', :action => 'new',
36 :project_id => 'foo' }
40 :project_id => 'foo' }
37 )
41 )
38 assert_routing(
42 assert_routing(
39 { :method => 'post', :path => "/projects/foo/versions" },
43 { :method => 'post', :path => "/projects/foo/versions" },
40 { :controller => 'versions', :action => 'create',
44 { :controller => 'versions', :action => 'create',
41 :project_id => 'foo' }
45 :project_id => 'foo' }
42 )
46 )
43 assert_routing(
47 assert_routing(
44 { :method => 'post', :path => "/projects/foo/versions.xml" },
48 { :method => 'post', :path => "/projects/foo/versions.xml" },
45 { :controller => 'versions', :action => 'create',
49 { :controller => 'versions', :action => 'create',
46 :project_id => 'foo', :format => 'xml' }
50 :project_id => 'foo', :format => 'xml' }
47 )
51 )
48 assert_routing(
52 assert_routing(
49 { :method => 'post', :path => "/projects/foo/versions.json" },
53 { :method => 'post', :path => "/projects/foo/versions.json" },
50 { :controller => 'versions', :action => 'create',
54 { :controller => 'versions', :action => 'create',
51 :project_id => 'foo', :format => 'json' }
55 :project_id => 'foo', :format => 'json' }
52 )
56 )
53 assert_routing(
57 assert_routing(
54 { :method => 'get', :path => "/versions/1" },
58 { :method => 'get', :path => "/versions/1" },
55 { :controller => 'versions', :action => 'show', :id => '1' }
59 { :controller => 'versions', :action => 'show', :id => '1' }
56 )
60 )
57 assert_routing(
61 assert_routing(
58 { :method => 'get', :path => "/versions/1.xml" },
62 { :method => 'get', :path => "/versions/1.xml" },
59 { :controller => 'versions', :action => 'show', :id => '1',
63 { :controller => 'versions', :action => 'show', :id => '1',
60 :format => 'xml' }
64 :format => 'xml' }
61 )
65 )
62 assert_routing(
66 assert_routing(
63 { :method => 'get', :path => "/versions/1.json" },
67 { :method => 'get', :path => "/versions/1.json" },
64 { :controller => 'versions', :action => 'show', :id => '1',
68 { :controller => 'versions', :action => 'show', :id => '1',
65 :format => 'json' }
69 :format => 'json' }
66 )
70 )
67 assert_routing(
71 assert_routing(
68 { :method => 'get', :path => "/versions/1/edit" },
72 { :method => 'get', :path => "/versions/1/edit" },
69 { :controller => 'versions', :action => 'edit', :id => '1' }
73 { :controller => 'versions', :action => 'edit', :id => '1' }
70 )
74 )
71 assert_routing(
75 assert_routing(
72 { :method => 'put', :path => "/versions/1" },
76 { :method => 'put', :path => "/versions/1" },
73 { :controller => 'versions', :action => 'update', :id => '1' }
77 { :controller => 'versions', :action => 'update', :id => '1' }
74 )
78 )
75 assert_routing(
79 assert_routing(
76 { :method => 'put', :path => "/versions/1.xml" },
80 { :method => 'put', :path => "/versions/1.xml" },
77 { :controller => 'versions', :action => 'update', :id => '1',
81 { :controller => 'versions', :action => 'update', :id => '1',
78 :format => 'xml' }
82 :format => 'xml' }
79 )
83 )
80 assert_routing(
84 assert_routing(
81 { :method => 'put', :path => "/versions/1.json" },
85 { :method => 'put', :path => "/versions/1.json" },
82 { :controller => 'versions', :action => 'update', :id => '1',
86 { :controller => 'versions', :action => 'update', :id => '1',
83 :format => 'json' }
87 :format => 'json' }
84 )
88 )
85 assert_routing(
89 assert_routing(
86 { :method => 'delete', :path => "/versions/1" },
90 { :method => 'delete', :path => "/versions/1" },
87 { :controller => 'versions', :action => 'destroy', :id => '1' }
91 { :controller => 'versions', :action => 'destroy', :id => '1' }
88 )
92 )
89 assert_routing(
93 assert_routing(
90 { :method => 'delete', :path => "/versions/1.xml" },
94 { :method => 'delete', :path => "/versions/1.xml" },
91 { :controller => 'versions', :action => 'destroy', :id => '1',
95 { :controller => 'versions', :action => 'destroy', :id => '1',
92 :format => 'xml' }
96 :format => 'xml' }
93 )
97 )
94 assert_routing(
98 assert_routing(
95 { :method => 'delete', :path => "/versions/1.json" },
99 { :method => 'delete', :path => "/versions/1.json" },
96 { :controller => 'versions', :action => 'destroy', :id => '1',
100 { :controller => 'versions', :action => 'destroy', :id => '1',
97 :format => 'json' }
101 :format => 'json' }
98 )
102 )
99 assert_routing(
103 assert_routing(
100 { :method => 'put', :path => "/projects/foo/versions/close_completed" },
104 { :method => 'put', :path => "/projects/foo/versions/close_completed" },
101 { :controller => 'versions', :action => 'close_completed',
105 { :controller => 'versions', :action => 'close_completed',
102 :project_id => 'foo' }
106 :project_id => 'foo' }
103 )
107 )
104 assert_routing(
108 assert_routing(
105 { :method => 'post', :path => "/versions/1/status_by" },
109 { :method => 'post', :path => "/versions/1/status_by" },
106 { :controller => 'versions', :action => 'status_by', :id => '1' }
110 { :controller => 'versions', :action => 'status_by', :id => '1' }
107 )
111 )
108 end
112 end
109 end
113 end
@@ -1,533 +1,529
1 # Redmine - project management software
1 # Redmine - project management software
2 # Copyright (C) 2006-2011 Jean-Philippe Lang
2 # Copyright (C) 2006-2011 Jean-Philippe Lang
3 #
3 #
4 # This program is free software; you can redistribute it and/or
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
7 # of the License, or (at your option) any later version.
8 #
8 #
9 # This program is distributed in the hope that it will be useful,
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
12 # GNU General Public License for more details.
13 #
13 #
14 # You should have received a copy of the GNU General Public License
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
17
18 require File.expand_path('../../test_helper', __FILE__)
18 require File.expand_path('../../test_helper', __FILE__)
19
19
20 class RoutingTest < ActionController::IntegrationTest
20 class RoutingTest < ActionController::IntegrationTest
21 def test_issues_rest_actions
21 def test_issues_rest_actions
22 assert_routing(
22 assert_routing(
23 { :method => 'get', :path => "/issues" },
23 { :method => 'get', :path => "/issues" },
24 { :controller => 'issues', :action => 'index' }
24 { :controller => 'issues', :action => 'index' }
25 )
25 )
26 assert_routing(
26 assert_routing(
27 { :method => 'get', :path => "/issues.pdf" },
27 { :method => 'get', :path => "/issues.pdf" },
28 { :controller => 'issues', :action => 'index', :format => 'pdf' }
28 { :controller => 'issues', :action => 'index', :format => 'pdf' }
29 )
29 )
30 assert_routing(
30 assert_routing(
31 { :method => 'get', :path => "/issues.atom" },
31 { :method => 'get', :path => "/issues.atom" },
32 { :controller => 'issues', :action => 'index', :format => 'atom' }
32 { :controller => 'issues', :action => 'index', :format => 'atom' }
33 )
33 )
34 assert_routing(
34 assert_routing(
35 { :method => 'get', :path => "/issues.xml" },
35 { :method => 'get', :path => "/issues.xml" },
36 { :controller => 'issues', :action => 'index', :format => 'xml' }
36 { :controller => 'issues', :action => 'index', :format => 'xml' }
37 )
37 )
38 assert_routing(
38 assert_routing(
39 { :method => 'get', :path => "/projects/23/issues" },
39 { :method => 'get', :path => "/projects/23/issues" },
40 { :controller => 'issues', :action => 'index', :project_id => '23' }
40 { :controller => 'issues', :action => 'index', :project_id => '23' }
41 )
41 )
42 assert_routing(
42 assert_routing(
43 { :method => 'get', :path => "/projects/23/issues.pdf" },
43 { :method => 'get', :path => "/projects/23/issues.pdf" },
44 { :controller => 'issues', :action => 'index', :project_id => '23',
44 { :controller => 'issues', :action => 'index', :project_id => '23',
45 :format => 'pdf' }
45 :format => 'pdf' }
46 )
46 )
47 assert_routing(
47 assert_routing(
48 { :method => 'get', :path => "/projects/23/issues.atom" },
48 { :method => 'get', :path => "/projects/23/issues.atom" },
49 { :controller => 'issues', :action => 'index', :project_id => '23',
49 { :controller => 'issues', :action => 'index', :project_id => '23',
50 :format => 'atom' }
50 :format => 'atom' }
51 )
51 )
52 assert_routing(
52 assert_routing(
53 { :method => 'get', :path => "/projects/23/issues.xml" },
53 { :method => 'get', :path => "/projects/23/issues.xml" },
54 { :controller => 'issues', :action => 'index', :project_id => '23',
54 { :controller => 'issues', :action => 'index', :project_id => '23',
55 :format => 'xml' }
55 :format => 'xml' }
56 )
56 )
57 assert_routing(
57 assert_routing(
58 { :method => 'get', :path => "/issues/64" },
58 { :method => 'get', :path => "/issues/64" },
59 { :controller => 'issues', :action => 'show', :id => '64' }
59 { :controller => 'issues', :action => 'show', :id => '64' }
60 )
60 )
61 assert_routing(
61 assert_routing(
62 { :method => 'get', :path => "/issues/64.pdf" },
62 { :method => 'get', :path => "/issues/64.pdf" },
63 { :controller => 'issues', :action => 'show', :id => '64',
63 { :controller => 'issues', :action => 'show', :id => '64',
64 :format => 'pdf' }
64 :format => 'pdf' }
65 )
65 )
66 assert_routing(
66 assert_routing(
67 { :method => 'get', :path => "/issues/64.atom" },
67 { :method => 'get', :path => "/issues/64.atom" },
68 { :controller => 'issues', :action => 'show', :id => '64',
68 { :controller => 'issues', :action => 'show', :id => '64',
69 :format => 'atom' }
69 :format => 'atom' }
70 )
70 )
71 assert_routing(
71 assert_routing(
72 { :method => 'get', :path => "/issues/64.xml" },
72 { :method => 'get', :path => "/issues/64.xml" },
73 { :controller => 'issues', :action => 'show', :id => '64',
73 { :controller => 'issues', :action => 'show', :id => '64',
74 :format => 'xml' }
74 :format => 'xml' }
75 )
75 )
76 assert_routing(
76 assert_routing(
77 { :method => 'get', :path => "/projects/23/issues/new" },
77 { :method => 'get', :path => "/projects/23/issues/new" },
78 { :controller => 'issues', :action => 'new', :project_id => '23' }
78 { :controller => 'issues', :action => 'new', :project_id => '23' }
79 )
79 )
80 end
80 end
81
81
82 def test_issues_form_update
82 def test_issues_form_update
83 assert_routing(
83 assert_routing(
84 { :method => 'post', :path => "/projects/23/issues/new" },
84 { :method => 'post', :path => "/projects/23/issues/new" },
85 { :controller => 'issues', :action => 'new', :project_id => '23' }
85 { :controller => 'issues', :action => 'new', :project_id => '23' }
86 )
86 )
87 assert_routing(
87 assert_routing(
88 { :method => 'post', :path => "/projects/23/issues" },
88 { :method => 'post', :path => "/projects/23/issues" },
89 { :controller => 'issues', :action => 'create', :project_id => '23' }
89 { :controller => 'issues', :action => 'create', :project_id => '23' }
90 )
90 )
91 assert_routing(
91 assert_routing(
92 { :method => 'post', :path => "/issues.xml" },
92 { :method => 'post', :path => "/issues.xml" },
93 { :controller => 'issues', :action => 'create', :format => 'xml' }
93 { :controller => 'issues', :action => 'create', :format => 'xml' }
94 )
94 )
95 assert_routing(
95 assert_routing(
96 { :method => 'get', :path => "/issues/64/edit" },
96 { :method => 'get', :path => "/issues/64/edit" },
97 { :controller => 'issues', :action => 'edit', :id => '64' }
97 { :controller => 'issues', :action => 'edit', :id => '64' }
98 )
98 )
99 assert_routing(
99 assert_routing(
100 { :method => 'put', :path => "/issues/1.xml" },
100 { :method => 'put', :path => "/issues/1.xml" },
101 { :controller => 'issues', :action => 'update', :id => '1',
101 { :controller => 'issues', :action => 'update', :id => '1',
102 :format => 'xml' }
102 :format => 'xml' }
103 )
103 )
104 assert_routing(
104 assert_routing(
105 { :method => 'delete', :path => "/issues/1.xml" },
105 { :method => 'delete', :path => "/issues/1.xml" },
106 { :controller => 'issues', :action => 'destroy', :id => '1',
106 { :controller => 'issues', :action => 'destroy', :id => '1',
107 :format => 'xml' }
107 :format => 'xml' }
108 )
108 )
109 end
109 end
110
110
111 def test_issues_extra_actions
111 def test_issues_extra_actions
112 assert_routing(
112 assert_routing(
113 { :method => 'get', :path => "/projects/23/issues/64/copy" },
113 { :method => 'get', :path => "/projects/23/issues/64/copy" },
114 { :controller => 'issues', :action => 'new', :project_id => '23',
114 { :controller => 'issues', :action => 'new', :project_id => '23',
115 :copy_from => '64' }
115 :copy_from => '64' }
116 )
116 )
117 assert_routing(
117 assert_routing(
118 { :method => 'get', :path => "/issues/preview/123" },
118 { :method => 'get', :path => "/issues/preview/123" },
119 { :controller => 'previews', :action => 'issue', :id => '123' }
119 { :controller => 'previews', :action => 'issue', :id => '123' }
120 )
120 )
121 assert_routing(
121 assert_routing(
122 { :method => 'post', :path => "/issues/preview/123" },
122 { :method => 'post', :path => "/issues/preview/123" },
123 { :controller => 'previews', :action => 'issue', :id => '123' }
123 { :controller => 'previews', :action => 'issue', :id => '123' }
124 )
124 )
125 assert_routing(
125 assert_routing(
126 { :method => 'get', :path => "/issues/context_menu" },
126 { :method => 'get', :path => "/issues/context_menu" },
127 { :controller => 'context_menus', :action => 'issues' }
127 { :controller => 'context_menus', :action => 'issues' }
128 )
128 )
129 assert_routing(
129 assert_routing(
130 { :method => 'post', :path => "/issues/context_menu" },
130 { :method => 'post', :path => "/issues/context_menu" },
131 { :controller => 'context_menus', :action => 'issues' }
131 { :controller => 'context_menus', :action => 'issues' }
132 )
132 )
133 assert_routing(
133 assert_routing(
134 { :method => 'get', :path => "/issues/bulk_edit" },
134 { :method => 'get', :path => "/issues/bulk_edit" },
135 { :controller => 'issues', :action => 'bulk_edit' }
135 { :controller => 'issues', :action => 'bulk_edit' }
136 )
136 )
137 assert_routing(
137 assert_routing(
138 { :method => 'post', :path => "/issues/bulk_update" },
138 { :method => 'post', :path => "/issues/bulk_update" },
139 { :controller => 'issues', :action => 'bulk_update' }
139 { :controller => 'issues', :action => 'bulk_update' }
140 )
140 )
141 end
141 end
142
142
143 def test_issue_categories
143 def test_issue_categories
144 assert_routing(
144 assert_routing(
145 { :method => 'get', :path => "/projects/foo/issue_categories" },
145 { :method => 'get', :path => "/projects/foo/issue_categories" },
146 { :controller => 'issue_categories', :action => 'index',
146 { :controller => 'issue_categories', :action => 'index',
147 :project_id => 'foo' }
147 :project_id => 'foo' }
148 )
148 )
149 assert_routing(
149 assert_routing(
150 { :method => 'get', :path => "/projects/foo/issue_categories.xml" },
150 { :method => 'get', :path => "/projects/foo/issue_categories.xml" },
151 { :controller => 'issue_categories', :action => 'index',
151 { :controller => 'issue_categories', :action => 'index',
152 :project_id => 'foo', :format => 'xml' }
152 :project_id => 'foo', :format => 'xml' }
153 )
153 )
154 assert_routing(
154 assert_routing(
155 { :method => 'get', :path => "/projects/foo/issue_categories.json" },
155 { :method => 'get', :path => "/projects/foo/issue_categories.json" },
156 { :controller => 'issue_categories', :action => 'index',
156 { :controller => 'issue_categories', :action => 'index',
157 :project_id => 'foo', :format => 'json' }
157 :project_id => 'foo', :format => 'json' }
158 )
158 )
159 assert_routing(
159 assert_routing(
160 { :method => 'get', :path => "/projects/foo/issue_categories/new" },
160 { :method => 'get', :path => "/projects/foo/issue_categories/new" },
161 { :controller => 'issue_categories', :action => 'new',
161 { :controller => 'issue_categories', :action => 'new',
162 :project_id => 'foo' }
162 :project_id => 'foo' }
163 )
163 )
164 assert_routing(
164 assert_routing(
165 { :method => 'post', :path => "/projects/foo/issue_categories" },
165 { :method => 'post', :path => "/projects/foo/issue_categories" },
166 { :controller => 'issue_categories', :action => 'create',
166 { :controller => 'issue_categories', :action => 'create',
167 :project_id => 'foo' }
167 :project_id => 'foo' }
168 )
168 )
169 assert_routing(
169 assert_routing(
170 { :method => 'post', :path => "/projects/foo/issue_categories.xml" },
170 { :method => 'post', :path => "/projects/foo/issue_categories.xml" },
171 { :controller => 'issue_categories', :action => 'create',
171 { :controller => 'issue_categories', :action => 'create',
172 :project_id => 'foo', :format => 'xml' }
172 :project_id => 'foo', :format => 'xml' }
173 )
173 )
174 assert_routing(
174 assert_routing(
175 { :method => 'post', :path => "/projects/foo/issue_categories.json" },
175 { :method => 'post', :path => "/projects/foo/issue_categories.json" },
176 { :controller => 'issue_categories', :action => 'create',
176 { :controller => 'issue_categories', :action => 'create',
177 :project_id => 'foo', :format => 'json' }
177 :project_id => 'foo', :format => 'json' }
178 )
178 )
179 assert_routing(
179 assert_routing(
180 { :method => 'get', :path => "/issue_categories/1" },
180 { :method => 'get', :path => "/issue_categories/1" },
181 { :controller => 'issue_categories', :action => 'show', :id => '1' }
181 { :controller => 'issue_categories', :action => 'show', :id => '1' }
182 )
182 )
183 assert_routing(
183 assert_routing(
184 { :method => 'get', :path => "/issue_categories/1.xml" },
184 { :method => 'get', :path => "/issue_categories/1.xml" },
185 { :controller => 'issue_categories', :action => 'show', :id => '1',
185 { :controller => 'issue_categories', :action => 'show', :id => '1',
186 :format => 'xml' }
186 :format => 'xml' }
187 )
187 )
188 assert_routing(
188 assert_routing(
189 { :method => 'get', :path => "/issue_categories/1.json" },
189 { :method => 'get', :path => "/issue_categories/1.json" },
190 { :controller => 'issue_categories', :action => 'show', :id => '1',
190 { :controller => 'issue_categories', :action => 'show', :id => '1',
191 :format => 'json' }
191 :format => 'json' }
192 )
192 )
193 assert_routing(
193 assert_routing(
194 { :method => 'get', :path => "/issue_categories/1/edit" },
194 { :method => 'get', :path => "/issue_categories/1/edit" },
195 { :controller => 'issue_categories', :action => 'edit', :id => '1' }
195 { :controller => 'issue_categories', :action => 'edit', :id => '1' }
196 )
196 )
197 assert_routing(
197 assert_routing(
198 { :method => 'put', :path => "/issue_categories/1" },
198 { :method => 'put', :path => "/issue_categories/1" },
199 { :controller => 'issue_categories', :action => 'update', :id => '1' }
199 { :controller => 'issue_categories', :action => 'update', :id => '1' }
200 )
200 )
201 assert_routing(
201 assert_routing(
202 { :method => 'put', :path => "/issue_categories/1.xml" },
202 { :method => 'put', :path => "/issue_categories/1.xml" },
203 { :controller => 'issue_categories', :action => 'update', :id => '1',
203 { :controller => 'issue_categories', :action => 'update', :id => '1',
204 :format => 'xml' }
204 :format => 'xml' }
205 )
205 )
206 assert_routing(
206 assert_routing(
207 { :method => 'put', :path => "/issue_categories/1.json" },
207 { :method => 'put', :path => "/issue_categories/1.json" },
208 { :controller => 'issue_categories', :action => 'update', :id => '1',
208 { :controller => 'issue_categories', :action => 'update', :id => '1',
209 :format => 'json' }
209 :format => 'json' }
210 )
210 )
211 assert_routing(
211 assert_routing(
212 { :method => 'delete', :path => "/issue_categories/1" },
212 { :method => 'delete', :path => "/issue_categories/1" },
213 { :controller => 'issue_categories', :action => 'destroy', :id => '1' }
213 { :controller => 'issue_categories', :action => 'destroy', :id => '1' }
214 )
214 )
215 assert_routing(
215 assert_routing(
216 { :method => 'delete', :path => "/issue_categories/1.xml" },
216 { :method => 'delete', :path => "/issue_categories/1.xml" },
217 { :controller => 'issue_categories', :action => 'destroy', :id => '1',
217 { :controller => 'issue_categories', :action => 'destroy', :id => '1',
218 :format => 'xml' }
218 :format => 'xml' }
219 )
219 )
220 assert_routing(
220 assert_routing(
221 { :method => 'delete', :path => "/issue_categories/1.json" },
221 { :method => 'delete', :path => "/issue_categories/1.json" },
222 { :controller => 'issue_categories', :action => 'destroy', :id => '1',
222 { :controller => 'issue_categories', :action => 'destroy', :id => '1',
223 :format => 'json' }
223 :format => 'json' }
224 )
224 )
225 end
225 end
226
226
227 def test_news
227 def test_news
228 assert_routing(
228 assert_routing(
229 { :method => 'get', :path => "/news" },
229 { :method => 'get', :path => "/news" },
230 { :controller => 'news', :action => 'index' }
230 { :controller => 'news', :action => 'index' }
231 )
231 )
232 assert_routing(
232 assert_routing(
233 { :method => 'get', :path => "/news.atom" },
233 { :method => 'get', :path => "/news.atom" },
234 { :controller => 'news', :action => 'index', :format => 'atom' }
234 { :controller => 'news', :action => 'index', :format => 'atom' }
235 )
235 )
236 assert_routing(
236 assert_routing(
237 { :method => 'get', :path => "/news.xml" },
237 { :method => 'get', :path => "/news.xml" },
238 { :controller => 'news', :action => 'index', :format => 'xml' }
238 { :controller => 'news', :action => 'index', :format => 'xml' }
239 )
239 )
240 assert_routing(
240 assert_routing(
241 { :method => 'get', :path => "/news.json" },
241 { :method => 'get', :path => "/news.json" },
242 { :controller => 'news', :action => 'index', :format => 'json' }
242 { :controller => 'news', :action => 'index', :format => 'json' }
243 )
243 )
244 assert_routing(
244 assert_routing(
245 { :method => 'get', :path => "/projects/567/news" },
245 { :method => 'get', :path => "/projects/567/news" },
246 { :controller => 'news', :action => 'index', :project_id => '567' }
246 { :controller => 'news', :action => 'index', :project_id => '567' }
247 )
247 )
248 assert_routing(
248 assert_routing(
249 { :method => 'get', :path => "/projects/567/news.atom" },
249 { :method => 'get', :path => "/projects/567/news.atom" },
250 { :controller => 'news', :action => 'index', :format => 'atom',
250 { :controller => 'news', :action => 'index', :format => 'atom',
251 :project_id => '567' }
251 :project_id => '567' }
252 )
252 )
253 assert_routing(
253 assert_routing(
254 { :method => 'get', :path => "/projects/567/news.xml" },
254 { :method => 'get', :path => "/projects/567/news.xml" },
255 { :controller => 'news', :action => 'index', :format => 'xml',
255 { :controller => 'news', :action => 'index', :format => 'xml',
256 :project_id => '567' }
256 :project_id => '567' }
257 )
257 )
258 assert_routing(
258 assert_routing(
259 { :method => 'get', :path => "/projects/567/news.json" },
259 { :method => 'get', :path => "/projects/567/news.json" },
260 { :controller => 'news', :action => 'index', :format => 'json',
260 { :controller => 'news', :action => 'index', :format => 'json',
261 :project_id => '567' }
261 :project_id => '567' }
262 )
262 )
263 assert_routing(
263 assert_routing(
264 { :method => 'get', :path => "/news/2" },
264 { :method => 'get', :path => "/news/2" },
265 { :controller => 'news', :action => 'show', :id => '2' }
265 { :controller => 'news', :action => 'show', :id => '2' }
266 )
266 )
267 assert_routing(
267 assert_routing(
268 { :method => 'get', :path => "/projects/567/news/new" },
268 { :method => 'get', :path => "/projects/567/news/new" },
269 { :controller => 'news', :action => 'new', :project_id => '567' }
269 { :controller => 'news', :action => 'new', :project_id => '567' }
270 )
270 )
271 assert_routing(
271 assert_routing(
272 { :method => 'get', :path => "/news/234" },
272 { :method => 'get', :path => "/news/234" },
273 { :controller => 'news', :action => 'show', :id => '234' }
273 { :controller => 'news', :action => 'show', :id => '234' }
274 )
274 )
275 assert_routing(
275 assert_routing(
276 { :method => 'get', :path => "/news/567/edit" },
276 { :method => 'get', :path => "/news/567/edit" },
277 { :controller => 'news', :action => 'edit', :id => '567' }
277 { :controller => 'news', :action => 'edit', :id => '567' }
278 )
278 )
279 assert_routing(
279 assert_routing(
280 { :method => 'get', :path => "/news/preview" },
280 { :method => 'get', :path => "/news/preview" },
281 { :controller => 'previews', :action => 'news' }
281 { :controller => 'previews', :action => 'news' }
282 )
282 )
283 assert_routing(
283 assert_routing(
284 { :method => 'post', :path => "/projects/567/news" },
284 { :method => 'post', :path => "/projects/567/news" },
285 { :controller => 'news', :action => 'create', :project_id => '567' }
285 { :controller => 'news', :action => 'create', :project_id => '567' }
286 )
286 )
287 assert_routing(
287 assert_routing(
288 { :method => 'post', :path => "/news/567/comments" },
288 { :method => 'post', :path => "/news/567/comments" },
289 { :controller => 'comments', :action => 'create', :id => '567' }
289 { :controller => 'comments', :action => 'create', :id => '567' }
290 )
290 )
291 assert_routing(
291 assert_routing(
292 { :method => 'put', :path => "/news/567" },
292 { :method => 'put', :path => "/news/567" },
293 { :controller => 'news', :action => 'update', :id => '567' }
293 { :controller => 'news', :action => 'update', :id => '567' }
294 )
294 )
295 assert_routing(
295 assert_routing(
296 { :method => 'delete', :path => "/news/567" },
296 { :method => 'delete', :path => "/news/567" },
297 { :controller => 'news', :action => 'destroy', :id => '567' }
297 { :controller => 'news', :action => 'destroy', :id => '567' }
298 )
298 )
299 assert_routing(
299 assert_routing(
300 { :method => 'delete', :path => "/news/567/comments/15" },
300 { :method => 'delete', :path => "/news/567/comments/15" },
301 { :controller => 'comments', :action => 'destroy', :id => '567',
301 { :controller => 'comments', :action => 'destroy', :id => '567',
302 :comment_id => '15' }
302 :comment_id => '15' }
303 )
303 )
304 end
304 end
305
305
306 def test_projects
306 def test_projects
307 assert_routing(
307 assert_routing(
308 { :method => 'get', :path => "/projects" },
308 { :method => 'get', :path => "/projects" },
309 { :controller => 'projects', :action => 'index' }
309 { :controller => 'projects', :action => 'index' }
310 )
310 )
311 assert_routing(
311 assert_routing(
312 { :method => 'get', :path => "/projects.atom" },
312 { :method => 'get', :path => "/projects.atom" },
313 { :controller => 'projects', :action => 'index', :format => 'atom' }
313 { :controller => 'projects', :action => 'index', :format => 'atom' }
314 )
314 )
315 assert_routing(
315 assert_routing(
316 { :method => 'get', :path => "/projects.xml" },
316 { :method => 'get', :path => "/projects.xml" },
317 { :controller => 'projects', :action => 'index', :format => 'xml' }
317 { :controller => 'projects', :action => 'index', :format => 'xml' }
318 )
318 )
319 assert_routing(
319 assert_routing(
320 { :method => 'get', :path => "/projects/new" },
320 { :method => 'get', :path => "/projects/new" },
321 { :controller => 'projects', :action => 'new' }
321 { :controller => 'projects', :action => 'new' }
322 )
322 )
323 assert_routing(
323 assert_routing(
324 { :method => 'get', :path => "/projects/test" },
324 { :method => 'get', :path => "/projects/test" },
325 { :controller => 'projects', :action => 'show', :id => 'test' }
325 { :controller => 'projects', :action => 'show', :id => 'test' }
326 )
326 )
327 assert_routing(
327 assert_routing(
328 { :method => 'get', :path => "/projects/1.xml" },
328 { :method => 'get', :path => "/projects/1.xml" },
329 { :controller => 'projects', :action => 'show', :id => '1',
329 { :controller => 'projects', :action => 'show', :id => '1',
330 :format => 'xml' }
330 :format => 'xml' }
331 )
331 )
332 assert_routing(
332 assert_routing(
333 { :method => 'get', :path => "/projects/4223/settings" },
333 { :method => 'get', :path => "/projects/4223/settings" },
334 { :controller => 'projects', :action => 'settings', :id => '4223' }
334 { :controller => 'projects', :action => 'settings', :id => '4223' }
335 )
335 )
336 assert_routing(
336 assert_routing(
337 { :method => 'get', :path => "/projects/4223/settings/members" },
337 { :method => 'get', :path => "/projects/4223/settings/members" },
338 { :controller => 'projects', :action => 'settings', :id => '4223',
338 { :controller => 'projects', :action => 'settings', :id => '4223',
339 :tab => 'members' }
339 :tab => 'members' }
340 )
340 )
341 assert_routing(
341 assert_routing(
342 { :method => 'get', :path => "/projects/33/roadmap" },
343 { :controller => 'versions', :action => 'index', :project_id => '33' }
344 )
345 assert_routing(
346 { :method => 'post', :path => "/projects" },
342 { :method => 'post', :path => "/projects" },
347 { :controller => 'projects', :action => 'create' }
343 { :controller => 'projects', :action => 'create' }
348 )
344 )
349 assert_routing(
345 assert_routing(
350 { :method => 'post', :path => "/projects.xml" },
346 { :method => 'post', :path => "/projects.xml" },
351 { :controller => 'projects', :action => 'create', :format => 'xml' }
347 { :controller => 'projects', :action => 'create', :format => 'xml' }
352 )
348 )
353 assert_routing(
349 assert_routing(
354 { :method => 'post', :path => "/projects/64/archive" },
350 { :method => 'post', :path => "/projects/64/archive" },
355 { :controller => 'projects', :action => 'archive', :id => '64' }
351 { :controller => 'projects', :action => 'archive', :id => '64' }
356 )
352 )
357 assert_routing(
353 assert_routing(
358 { :method => 'post', :path => "/projects/64/unarchive" },
354 { :method => 'post', :path => "/projects/64/unarchive" },
359 { :controller => 'projects', :action => 'unarchive', :id => '64' }
355 { :controller => 'projects', :action => 'unarchive', :id => '64' }
360 )
356 )
361 assert_routing(
357 assert_routing(
362 { :method => 'put', :path => "/projects/64/enumerations" },
358 { :method => 'put', :path => "/projects/64/enumerations" },
363 { :controller => 'project_enumerations', :action => 'update',
359 { :controller => 'project_enumerations', :action => 'update',
364 :project_id => '64' }
360 :project_id => '64' }
365 )
361 )
366 assert_routing(
362 assert_routing(
367 { :method => 'put', :path => "/projects/4223" },
363 { :method => 'put', :path => "/projects/4223" },
368 { :controller => 'projects', :action => 'update', :id => '4223' }
364 { :controller => 'projects', :action => 'update', :id => '4223' }
369 )
365 )
370 assert_routing(
366 assert_routing(
371 { :method => 'put', :path => "/projects/1.xml" },
367 { :method => 'put', :path => "/projects/1.xml" },
372 { :controller => 'projects', :action => 'update', :id => '1',
368 { :controller => 'projects', :action => 'update', :id => '1',
373 :format => 'xml' }
369 :format => 'xml' }
374 )
370 )
375 assert_routing(
371 assert_routing(
376 { :method => 'delete', :path => "/projects/64" },
372 { :method => 'delete', :path => "/projects/64" },
377 { :controller => 'projects', :action => 'destroy', :id => '64' }
373 { :controller => 'projects', :action => 'destroy', :id => '64' }
378 )
374 )
379 assert_routing(
375 assert_routing(
380 { :method => 'delete', :path => "/projects/1.xml" },
376 { :method => 'delete', :path => "/projects/1.xml" },
381 { :controller => 'projects', :action => 'destroy', :id => '1',
377 { :controller => 'projects', :action => 'destroy', :id => '1',
382 :format => 'xml' }
378 :format => 'xml' }
383 )
379 )
384 assert_routing(
380 assert_routing(
385 { :method => 'delete', :path => "/projects/64/enumerations" },
381 { :method => 'delete', :path => "/projects/64/enumerations" },
386 { :controller => 'project_enumerations', :action => 'destroy',
382 { :controller => 'project_enumerations', :action => 'destroy',
387 :project_id => '64' }
383 :project_id => '64' }
388 )
384 )
389 end
385 end
390
386
391 def test_queries
387 def test_queries
392 assert_routing(
388 assert_routing(
393 { :method => 'get', :path => "/queries.xml" },
389 { :method => 'get', :path => "/queries.xml" },
394 { :controller => 'queries', :action => 'index', :format => 'xml' }
390 { :controller => 'queries', :action => 'index', :format => 'xml' }
395 )
391 )
396 assert_routing(
392 assert_routing(
397 { :method => 'get', :path => "/queries.json" },
393 { :method => 'get', :path => "/queries.json" },
398 { :controller => 'queries', :action => 'index', :format => 'json' }
394 { :controller => 'queries', :action => 'index', :format => 'json' }
399 )
395 )
400 assert_routing(
396 assert_routing(
401 { :method => 'get', :path => "/queries/new" },
397 { :method => 'get', :path => "/queries/new" },
402 { :controller => 'queries', :action => 'new' }
398 { :controller => 'queries', :action => 'new' }
403 )
399 )
404 assert_routing(
400 assert_routing(
405 { :method => 'get', :path => "/projects/redmine/queries/new" },
401 { :method => 'get', :path => "/projects/redmine/queries/new" },
406 { :controller => 'queries', :action => 'new', :project_id => 'redmine' }
402 { :controller => 'queries', :action => 'new', :project_id => 'redmine' }
407 )
403 )
408 assert_routing(
404 assert_routing(
409 { :method => 'post', :path => "/queries" },
405 { :method => 'post', :path => "/queries" },
410 { :controller => 'queries', :action => 'create' }
406 { :controller => 'queries', :action => 'create' }
411 )
407 )
412 assert_routing(
408 assert_routing(
413 { :method => 'post', :path => "/projects/redmine/queries" },
409 { :method => 'post', :path => "/projects/redmine/queries" },
414 { :controller => 'queries', :action => 'create', :project_id => 'redmine' }
410 { :controller => 'queries', :action => 'create', :project_id => 'redmine' }
415 )
411 )
416 assert_routing(
412 assert_routing(
417 { :method => 'get', :path => "/queries/1/edit" },
413 { :method => 'get', :path => "/queries/1/edit" },
418 { :controller => 'queries', :action => 'edit', :id => '1' }
414 { :controller => 'queries', :action => 'edit', :id => '1' }
419 )
415 )
420 assert_routing(
416 assert_routing(
421 { :method => 'put', :path => "/queries/1" },
417 { :method => 'put', :path => "/queries/1" },
422 { :controller => 'queries', :action => 'update', :id => '1' }
418 { :controller => 'queries', :action => 'update', :id => '1' }
423 )
419 )
424 assert_routing(
420 assert_routing(
425 { :method => 'delete', :path => "/queries/1" },
421 { :method => 'delete', :path => "/queries/1" },
426 { :controller => 'queries', :action => 'destroy', :id => '1' }
422 { :controller => 'queries', :action => 'destroy', :id => '1' }
427 )
423 )
428 end
424 end
429
425
430 def test_wiki_singular_projects_pages
426 def test_wiki_singular_projects_pages
431 assert_routing(
427 assert_routing(
432 { :method => 'get', :path => "/projects/567/wiki" },
428 { :method => 'get', :path => "/projects/567/wiki" },
433 { :controller => 'wiki', :action => 'show', :project_id => '567' }
429 { :controller => 'wiki', :action => 'show', :project_id => '567' }
434 )
430 )
435 assert_routing(
431 assert_routing(
436 { :method => 'get', :path => "/projects/567/wiki/lalala" },
432 { :method => 'get', :path => "/projects/567/wiki/lalala" },
437 { :controller => 'wiki', :action => 'show', :project_id => '567',
433 { :controller => 'wiki', :action => 'show', :project_id => '567',
438 :id => 'lalala' }
434 :id => 'lalala' }
439 )
435 )
440 assert_routing(
436 assert_routing(
441 { :method => 'get', :path => "/projects/567/wiki/my_page/edit" },
437 { :method => 'get', :path => "/projects/567/wiki/my_page/edit" },
442 { :controller => 'wiki', :action => 'edit', :project_id => '567',
438 { :controller => 'wiki', :action => 'edit', :project_id => '567',
443 :id => 'my_page' }
439 :id => 'my_page' }
444 )
440 )
445 assert_routing(
441 assert_routing(
446 { :method => 'get', :path => "/projects/1/wiki/CookBook_documentation/history" },
442 { :method => 'get', :path => "/projects/1/wiki/CookBook_documentation/history" },
447 { :controller => 'wiki', :action => 'history', :project_id => '1',
443 { :controller => 'wiki', :action => 'history', :project_id => '1',
448 :id => 'CookBook_documentation' }
444 :id => 'CookBook_documentation' }
449 )
445 )
450 assert_routing(
446 assert_routing(
451 { :method => 'get', :path => "/projects/1/wiki/CookBook_documentation/diff" },
447 { :method => 'get', :path => "/projects/1/wiki/CookBook_documentation/diff" },
452 { :controller => 'wiki', :action => 'diff', :project_id => '1',
448 { :controller => 'wiki', :action => 'diff', :project_id => '1',
453 :id => 'CookBook_documentation' }
449 :id => 'CookBook_documentation' }
454 )
450 )
455 assert_routing(
451 assert_routing(
456 { :method => 'get', :path => "/projects/1/wiki/CookBook_documentation/diff/2" },
452 { :method => 'get', :path => "/projects/1/wiki/CookBook_documentation/diff/2" },
457 { :controller => 'wiki', :action => 'diff', :project_id => '1',
453 { :controller => 'wiki', :action => 'diff', :project_id => '1',
458 :id => 'CookBook_documentation', :version => '2' }
454 :id => 'CookBook_documentation', :version => '2' }
459 )
455 )
460 assert_routing(
456 assert_routing(
461 { :method => 'get', :path => "/projects/1/wiki/CookBook_documentation/diff/2/vs/1" },
457 { :method => 'get', :path => "/projects/1/wiki/CookBook_documentation/diff/2/vs/1" },
462 { :controller => 'wiki', :action => 'diff', :project_id => '1',
458 { :controller => 'wiki', :action => 'diff', :project_id => '1',
463 :id => 'CookBook_documentation', :version => '2', :version_from => '1' }
459 :id => 'CookBook_documentation', :version => '2', :version_from => '1' }
464 )
460 )
465 assert_routing(
461 assert_routing(
466 { :method => 'get', :path => "/projects/1/wiki/CookBook_documentation/annotate/2" },
462 { :method => 'get', :path => "/projects/1/wiki/CookBook_documentation/annotate/2" },
467 { :controller => 'wiki', :action => 'annotate', :project_id => '1',
463 { :controller => 'wiki', :action => 'annotate', :project_id => '1',
468 :id => 'CookBook_documentation', :version => '2' }
464 :id => 'CookBook_documentation', :version => '2' }
469 )
465 )
470 assert_routing(
466 assert_routing(
471 { :method => 'get', :path => "/projects/22/wiki/ladida/rename" },
467 { :method => 'get', :path => "/projects/22/wiki/ladida/rename" },
472 { :controller => 'wiki', :action => 'rename', :project_id => '22',
468 { :controller => 'wiki', :action => 'rename', :project_id => '22',
473 :id => 'ladida' }
469 :id => 'ladida' }
474 )
470 )
475 assert_routing(
471 assert_routing(
476 { :method => 'get', :path => "/projects/567/wiki/index" },
472 { :method => 'get', :path => "/projects/567/wiki/index" },
477 { :controller => 'wiki', :action => 'index', :project_id => '567' }
473 { :controller => 'wiki', :action => 'index', :project_id => '567' }
478 )
474 )
479 assert_routing(
475 assert_routing(
480 { :method => 'get', :path => "/projects/567/wiki/date_index" },
476 { :method => 'get', :path => "/projects/567/wiki/date_index" },
481 { :controller => 'wiki', :action => 'date_index', :project_id => '567' }
477 { :controller => 'wiki', :action => 'date_index', :project_id => '567' }
482 )
478 )
483 assert_routing(
479 assert_routing(
484 { :method => 'get', :path => "/projects/567/wiki/export" },
480 { :method => 'get', :path => "/projects/567/wiki/export" },
485 { :controller => 'wiki', :action => 'export', :project_id => '567' }
481 { :controller => 'wiki', :action => 'export', :project_id => '567' }
486 )
482 )
487 assert_routing(
483 assert_routing(
488 { :method => 'post', :path => "/projects/567/wiki/CookBook_documentation/preview" },
484 { :method => 'post', :path => "/projects/567/wiki/CookBook_documentation/preview" },
489 { :controller => 'wiki', :action => 'preview', :project_id => '567',
485 { :controller => 'wiki', :action => 'preview', :project_id => '567',
490 :id => 'CookBook_documentation' }
486 :id => 'CookBook_documentation' }
491 )
487 )
492 assert_routing(
488 assert_routing(
493 { :method => 'post', :path => "/projects/22/wiki/ladida/rename" },
489 { :method => 'post', :path => "/projects/22/wiki/ladida/rename" },
494 { :controller => 'wiki', :action => 'rename', :project_id => '22',
490 { :controller => 'wiki', :action => 'rename', :project_id => '22',
495 :id => 'ladida' }
491 :id => 'ladida' }
496 )
492 )
497 assert_routing(
493 assert_routing(
498 { :method => 'post', :path => "/projects/22/wiki/ladida/protect" },
494 { :method => 'post', :path => "/projects/22/wiki/ladida/protect" },
499 { :controller => 'wiki', :action => 'protect', :project_id => '22',
495 { :controller => 'wiki', :action => 'protect', :project_id => '22',
500 :id => 'ladida' }
496 :id => 'ladida' }
501 )
497 )
502 assert_routing(
498 assert_routing(
503 { :method => 'post', :path => "/projects/22/wiki/ladida/add_attachment" },
499 { :method => 'post', :path => "/projects/22/wiki/ladida/add_attachment" },
504 { :controller => 'wiki', :action => 'add_attachment', :project_id => '22',
500 { :controller => 'wiki', :action => 'add_attachment', :project_id => '22',
505 :id => 'ladida' }
501 :id => 'ladida' }
506 )
502 )
507 assert_routing(
503 assert_routing(
508 { :method => 'put', :path => "/projects/567/wiki/my_page" },
504 { :method => 'put', :path => "/projects/567/wiki/my_page" },
509 { :controller => 'wiki', :action => 'update', :project_id => '567',
505 { :controller => 'wiki', :action => 'update', :project_id => '567',
510 :id => 'my_page' }
506 :id => 'my_page' }
511 )
507 )
512 assert_routing(
508 assert_routing(
513 { :method => 'delete', :path => "/projects/22/wiki/ladida" },
509 { :method => 'delete', :path => "/projects/22/wiki/ladida" },
514 { :controller => 'wiki', :action => 'destroy', :project_id => '22',
510 { :controller => 'wiki', :action => 'destroy', :project_id => '22',
515 :id => 'ladida' }
511 :id => 'ladida' }
516 )
512 )
517 end
513 end
518
514
519 def test_wikis_plural_admin_setup
515 def test_wikis_plural_admin_setup
520 assert_routing(
516 assert_routing(
521 { :method => 'get', :path => "/projects/ladida/wiki/destroy" },
517 { :method => 'get', :path => "/projects/ladida/wiki/destroy" },
522 { :controller => 'wikis', :action => 'destroy', :id => 'ladida' }
518 { :controller => 'wikis', :action => 'destroy', :id => 'ladida' }
523 )
519 )
524 assert_routing(
520 assert_routing(
525 { :method => 'post', :path => "/projects/ladida/wiki" },
521 { :method => 'post', :path => "/projects/ladida/wiki" },
526 { :controller => 'wikis', :action => 'edit', :id => 'ladida' }
522 { :controller => 'wikis', :action => 'edit', :id => 'ladida' }
527 )
523 )
528 assert_routing(
524 assert_routing(
529 { :method => 'post', :path => "/projects/ladida/wiki/destroy" },
525 { :method => 'post', :path => "/projects/ladida/wiki/destroy" },
530 { :controller => 'wikis', :action => 'destroy', :id => 'ladida' }
526 { :controller => 'wikis', :action => 'destroy', :id => 'ladida' }
531 )
527 )
532 end
528 end
533 end
529 end
General Comments 0
You need to be logged in to leave comments. Login now