##// END OF EJS Templates
test: replace "should_route" of "test_custom_fields" to "assert_routing" at integration/routing_test.rb...
Toshi MARUYAMA -
r8095:f70a5397f29c
parent child
Show More
@@ -1,515 +1,533
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_activities
21 def test_activities
22 assert_routing(
22 assert_routing(
23 { :method => 'get', :path => "/activity" },
23 { :method => 'get', :path => "/activity" },
24 { :controller => 'activities', :action => 'index', :id => nil }
24 { :controller => 'activities', :action => 'index', :id => nil }
25 )
25 )
26 assert_routing(
26 assert_routing(
27 { :method => 'get', :path => "/activity.atom" },
27 { :method => 'get', :path => "/activity.atom" },
28 { :controller => 'activities', :action => 'index', :id => nil, :format => 'atom' }
28 { :controller => 'activities', :action => 'index', :id => nil, :format => 'atom' }
29 )
29 )
30 end
30 end
31
31
32 def test_attachments
32 def test_attachments
33 assert_routing(
33 assert_routing(
34 { :method => 'get', :path => "/attachments/1" },
34 { :method => 'get', :path => "/attachments/1" },
35 { :controller => 'attachments', :action => 'show', :id => '1' }
35 { :controller => 'attachments', :action => 'show', :id => '1' }
36 )
36 )
37 assert_routing(
37 assert_routing(
38 { :method => 'get', :path => "/attachments/1.xml" },
38 { :method => 'get', :path => "/attachments/1.xml" },
39 { :controller => 'attachments', :action => 'show', :id => '1', :format => 'xml' }
39 { :controller => 'attachments', :action => 'show', :id => '1', :format => 'xml' }
40 )
40 )
41 assert_routing(
41 assert_routing(
42 { :method => 'get', :path => "/attachments/1.json" },
42 { :method => 'get', :path => "/attachments/1.json" },
43 { :controller => 'attachments', :action => 'show', :id => '1', :format => 'json' }
43 { :controller => 'attachments', :action => 'show', :id => '1', :format => 'json' }
44 )
44 )
45 assert_routing(
45 assert_routing(
46 { :method => 'get', :path => "/attachments/1/filename.ext" },
46 { :method => 'get', :path => "/attachments/1/filename.ext" },
47 { :controller => 'attachments', :action => 'show', :id => '1',
47 { :controller => 'attachments', :action => 'show', :id => '1',
48 :filename => 'filename.ext' }
48 :filename => 'filename.ext' }
49 )
49 )
50 assert_routing(
50 assert_routing(
51 { :method => 'get', :path => "/attachments/download/1" },
51 { :method => 'get', :path => "/attachments/download/1" },
52 { :controller => 'attachments', :action => 'download', :id => '1' }
52 { :controller => 'attachments', :action => 'download', :id => '1' }
53 )
53 )
54 assert_routing(
54 assert_routing(
55 { :method => 'get', :path => "/attachments/download/1/filename.ext" },
55 { :method => 'get', :path => "/attachments/download/1/filename.ext" },
56 { :controller => 'attachments', :action => 'download', :id => '1',
56 { :controller => 'attachments', :action => 'download', :id => '1',
57 :filename => 'filename.ext' }
57 :filename => 'filename.ext' }
58 )
58 )
59 end
59 end
60
60
61 def test_boards
61 def test_boards
62 assert_routing(
62 assert_routing(
63 { :method => 'get', :path => "/projects/world_domination/boards" },
63 { :method => 'get', :path => "/projects/world_domination/boards" },
64 { :controller => 'boards', :action => 'index', :project_id => 'world_domination' }
64 { :controller => 'boards', :action => 'index', :project_id => 'world_domination' }
65 )
65 )
66 assert_routing(
66 assert_routing(
67 { :method => 'get', :path => "/projects/world_domination/boards/new" },
67 { :method => 'get', :path => "/projects/world_domination/boards/new" },
68 { :controller => 'boards', :action => 'new', :project_id => 'world_domination' }
68 { :controller => 'boards', :action => 'new', :project_id => 'world_domination' }
69 )
69 )
70 assert_routing(
70 assert_routing(
71 { :method => 'get', :path => "/projects/world_domination/boards/44" },
71 { :method => 'get', :path => "/projects/world_domination/boards/44" },
72 { :controller => 'boards', :action => 'show', :project_id => 'world_domination',
72 { :controller => 'boards', :action => 'show', :project_id => 'world_domination',
73 :id => '44' }
73 :id => '44' }
74 )
74 )
75 assert_routing(
75 assert_routing(
76 { :method => 'get', :path => "/projects/world_domination/boards/44.atom" },
76 { :method => 'get', :path => "/projects/world_domination/boards/44.atom" },
77 { :controller => 'boards', :action => 'show', :project_id => 'world_domination',
77 { :controller => 'boards', :action => 'show', :project_id => 'world_domination',
78 :id => '44', :format => 'atom' }
78 :id => '44', :format => 'atom' }
79 )
79 )
80 assert_routing(
80 assert_routing(
81 { :method => 'get', :path => "/projects/world_domination/boards/44/edit" },
81 { :method => 'get', :path => "/projects/world_domination/boards/44/edit" },
82 { :controller => 'boards', :action => 'edit', :project_id => 'world_domination',
82 { :controller => 'boards', :action => 'edit', :project_id => 'world_domination',
83 :id => '44' }
83 :id => '44' }
84 )
84 )
85 assert_routing(
85 assert_routing(
86 { :method => 'post', :path => "/projects/world_domination/boards" },
86 { :method => 'post', :path => "/projects/world_domination/boards" },
87 { :controller => 'boards', :action => 'create', :project_id => 'world_domination' }
87 { :controller => 'boards', :action => 'create', :project_id => 'world_domination' }
88 )
88 )
89 assert_routing(
89 assert_routing(
90 { :method => 'put', :path => "/projects/world_domination/boards/44" },
90 { :method => 'put', :path => "/projects/world_domination/boards/44" },
91 { :controller => 'boards', :action => 'update', :project_id => 'world_domination', :id => '44' }
91 { :controller => 'boards', :action => 'update', :project_id => 'world_domination', :id => '44' }
92 )
92 )
93 assert_routing(
93 assert_routing(
94 { :method => 'delete', :path => "/projects/world_domination/boards/44" },
94 { :method => 'delete', :path => "/projects/world_domination/boards/44" },
95 { :controller => 'boards', :action => 'destroy', :project_id => 'world_domination', :id => '44' }
95 { :controller => 'boards', :action => 'destroy', :project_id => 'world_domination', :id => '44' }
96 )
96 )
97 end
97 end
98
98
99 context "custom_fields" do
99 def test_custom_fields
100 should_route :get, "/custom_fields", :controller => 'custom_fields', :action => 'index'
100 assert_routing(
101 should_route :get, "/custom_fields/new", :controller => 'custom_fields', :action => 'new'
101 { :method => 'get', :path => "/custom_fields" },
102 should_route :post, "/custom_fields", :controller => 'custom_fields', :action => 'create'
102 { :controller => 'custom_fields', :action => 'index' }
103 should_route :get, "/custom_fields/2/edit", :controller => 'custom_fields', :action => 'edit', :id => 2
103 )
104 should_route :put, "/custom_fields/2", :controller => 'custom_fields', :action => 'update', :id => 2
104 assert_routing(
105 should_route :delete, "/custom_fields/2", :controller => 'custom_fields', :action => 'destroy', :id => 2
105 { :method => 'get', :path => "/custom_fields/new" },
106 { :controller => 'custom_fields', :action => 'new' }
107 )
108 assert_routing(
109 { :method => 'post', :path => "/custom_fields" },
110 { :controller => 'custom_fields', :action => 'create' }
111 )
112 assert_routing(
113 { :method => 'get', :path => "/custom_fields/2/edit" },
114 { :controller => 'custom_fields', :action => 'edit', :id => '2' }
115 )
116 assert_routing(
117 { :method => 'put', :path => "/custom_fields/2" },
118 { :controller => 'custom_fields', :action => 'update', :id => '2' }
119 )
120 assert_routing(
121 { :method => 'delete', :path => "/custom_fields/2" },
122 { :controller => 'custom_fields', :action => 'destroy', :id => '2' }
123 )
106 end
124 end
107
125
108 context "documents" do
126 context "documents" do
109 should_route :get, "/projects/567/documents", :controller => 'documents', :action => 'index', :project_id => '567'
127 should_route :get, "/projects/567/documents", :controller => 'documents', :action => 'index', :project_id => '567'
110 should_route :get, "/projects/567/documents/new", :controller => 'documents', :action => 'new', :project_id => '567'
128 should_route :get, "/projects/567/documents/new", :controller => 'documents', :action => 'new', :project_id => '567'
111 should_route :get, "/documents/22", :controller => 'documents', :action => 'show', :id => '22'
129 should_route :get, "/documents/22", :controller => 'documents', :action => 'show', :id => '22'
112 should_route :get, "/documents/22/edit", :controller => 'documents', :action => 'edit', :id => '22'
130 should_route :get, "/documents/22/edit", :controller => 'documents', :action => 'edit', :id => '22'
113
131
114 should_route :post, "/projects/567/documents", :controller => 'documents', :action => 'create', :project_id => '567'
132 should_route :post, "/projects/567/documents", :controller => 'documents', :action => 'create', :project_id => '567'
115 should_route :put, "/documents/22", :controller => 'documents', :action => 'update', :id => '22'
133 should_route :put, "/documents/22", :controller => 'documents', :action => 'update', :id => '22'
116 should_route :delete, "/documents/22", :controller => 'documents', :action => 'destroy', :id => '22'
134 should_route :delete, "/documents/22", :controller => 'documents', :action => 'destroy', :id => '22'
117
135
118 should_route :post, "/documents/22/add_attachment", :controller => 'documents', :action => 'add_attachment', :id => '22'
136 should_route :post, "/documents/22/add_attachment", :controller => 'documents', :action => 'add_attachment', :id => '22'
119 end
137 end
120
138
121 context "roles" do
139 context "roles" do
122 should_route :get, "/enumerations", :controller => 'enumerations', :action => 'index'
140 should_route :get, "/enumerations", :controller => 'enumerations', :action => 'index'
123 should_route :get, "/enumerations/new", :controller => 'enumerations', :action => 'new'
141 should_route :get, "/enumerations/new", :controller => 'enumerations', :action => 'new'
124 should_route :post, "/enumerations", :controller => 'enumerations', :action => 'create'
142 should_route :post, "/enumerations", :controller => 'enumerations', :action => 'create'
125 should_route :get, "/enumerations/2/edit", :controller => 'enumerations', :action => 'edit', :id => 2
143 should_route :get, "/enumerations/2/edit", :controller => 'enumerations', :action => 'edit', :id => 2
126 should_route :put, "/enumerations/2", :controller => 'enumerations', :action => 'update', :id => 2
144 should_route :put, "/enumerations/2", :controller => 'enumerations', :action => 'update', :id => 2
127 should_route :delete, "/enumerations/2", :controller => 'enumerations', :action => 'destroy', :id => 2
145 should_route :delete, "/enumerations/2", :controller => 'enumerations', :action => 'destroy', :id => 2
128 end
146 end
129
147
130 context "groups" do
148 context "groups" do
131 should_route :post, "/groups/567/users", :controller => 'groups', :action => 'add_users', :id => '567'
149 should_route :post, "/groups/567/users", :controller => 'groups', :action => 'add_users', :id => '567'
132 should_route :delete, "/groups/567/users/12", :controller => 'groups', :action => 'remove_user', :id => '567', :user_id => '12'
150 should_route :delete, "/groups/567/users/12", :controller => 'groups', :action => 'remove_user', :id => '567', :user_id => '12'
133 end
151 end
134
152
135 context "issues" do
153 context "issues" do
136 # REST actions
154 # REST actions
137 should_route :get, "/issues", :controller => 'issues', :action => 'index'
155 should_route :get, "/issues", :controller => 'issues', :action => 'index'
138 should_route :get, "/issues.pdf", :controller => 'issues', :action => 'index', :format => 'pdf'
156 should_route :get, "/issues.pdf", :controller => 'issues', :action => 'index', :format => 'pdf'
139 should_route :get, "/issues.atom", :controller => 'issues', :action => 'index', :format => 'atom'
157 should_route :get, "/issues.atom", :controller => 'issues', :action => 'index', :format => 'atom'
140 should_route :get, "/issues.xml", :controller => 'issues', :action => 'index', :format => 'xml'
158 should_route :get, "/issues.xml", :controller => 'issues', :action => 'index', :format => 'xml'
141 should_route :get, "/projects/23/issues", :controller => 'issues', :action => 'index', :project_id => '23'
159 should_route :get, "/projects/23/issues", :controller => 'issues', :action => 'index', :project_id => '23'
142 should_route :get, "/projects/23/issues.pdf", :controller => 'issues', :action => 'index', :project_id => '23', :format => 'pdf'
160 should_route :get, "/projects/23/issues.pdf", :controller => 'issues', :action => 'index', :project_id => '23', :format => 'pdf'
143 should_route :get, "/projects/23/issues.atom", :controller => 'issues', :action => 'index', :project_id => '23', :format => 'atom'
161 should_route :get, "/projects/23/issues.atom", :controller => 'issues', :action => 'index', :project_id => '23', :format => 'atom'
144 should_route :get, "/projects/23/issues.xml", :controller => 'issues', :action => 'index', :project_id => '23', :format => 'xml'
162 should_route :get, "/projects/23/issues.xml", :controller => 'issues', :action => 'index', :project_id => '23', :format => 'xml'
145 should_route :get, "/issues/64", :controller => 'issues', :action => 'show', :id => '64'
163 should_route :get, "/issues/64", :controller => 'issues', :action => 'show', :id => '64'
146 should_route :get, "/issues/64.pdf", :controller => 'issues', :action => 'show', :id => '64', :format => 'pdf'
164 should_route :get, "/issues/64.pdf", :controller => 'issues', :action => 'show', :id => '64', :format => 'pdf'
147 should_route :get, "/issues/64.atom", :controller => 'issues', :action => 'show', :id => '64', :format => 'atom'
165 should_route :get, "/issues/64.atom", :controller => 'issues', :action => 'show', :id => '64', :format => 'atom'
148 should_route :get, "/issues/64.xml", :controller => 'issues', :action => 'show', :id => '64', :format => 'xml'
166 should_route :get, "/issues/64.xml", :controller => 'issues', :action => 'show', :id => '64', :format => 'xml'
149
167
150 should_route :get, "/projects/23/issues/new", :controller => 'issues', :action => 'new', :project_id => '23'
168 should_route :get, "/projects/23/issues/new", :controller => 'issues', :action => 'new', :project_id => '23'
151 # issue form update
169 # issue form update
152 should_route :post, "/projects/23/issues/new", :controller => 'issues', :action => 'new', :project_id => '23'
170 should_route :post, "/projects/23/issues/new", :controller => 'issues', :action => 'new', :project_id => '23'
153 should_route :post, "/projects/23/issues", :controller => 'issues', :action => 'create', :project_id => '23'
171 should_route :post, "/projects/23/issues", :controller => 'issues', :action => 'create', :project_id => '23'
154 should_route :post, "/issues.xml", :controller => 'issues', :action => 'create', :format => 'xml'
172 should_route :post, "/issues.xml", :controller => 'issues', :action => 'create', :format => 'xml'
155
173
156 should_route :get, "/issues/64/edit", :controller => 'issues', :action => 'edit', :id => '64'
174 should_route :get, "/issues/64/edit", :controller => 'issues', :action => 'edit', :id => '64'
157 should_route :put, "/issues/1.xml", :controller => 'issues', :action => 'update', :id => '1', :format => 'xml'
175 should_route :put, "/issues/1.xml", :controller => 'issues', :action => 'update', :id => '1', :format => 'xml'
158
176
159 should_route :delete, "/issues/1.xml", :controller => 'issues', :action => 'destroy', :id => '1', :format => 'xml'
177 should_route :delete, "/issues/1.xml", :controller => 'issues', :action => 'destroy', :id => '1', :format => 'xml'
160
178
161 # Extra actions
179 # Extra actions
162 should_route :get, "/projects/23/issues/64/copy", :controller => 'issues', :action => 'new', :project_id => '23', :copy_from => '64'
180 should_route :get, "/projects/23/issues/64/copy", :controller => 'issues', :action => 'new', :project_id => '23', :copy_from => '64'
163
181
164 should_route :get, "/issues/move/new", :controller => 'issue_moves', :action => 'new'
182 should_route :get, "/issues/move/new", :controller => 'issue_moves', :action => 'new'
165 should_route :post, "/issues/move", :controller => 'issue_moves', :action => 'create'
183 should_route :post, "/issues/move", :controller => 'issue_moves', :action => 'create'
166
184
167 should_route :post, "/issues/1/quoted", :controller => 'journals', :action => 'new', :id => '1'
185 should_route :post, "/issues/1/quoted", :controller => 'journals', :action => 'new', :id => '1'
168
186
169 should_route :get, "/issues/calendar", :controller => 'calendars', :action => 'show'
187 should_route :get, "/issues/calendar", :controller => 'calendars', :action => 'show'
170 should_route :get, "/projects/project-name/issues/calendar", :controller => 'calendars', :action => 'show', :project_id => 'project-name'
188 should_route :get, "/projects/project-name/issues/calendar", :controller => 'calendars', :action => 'show', :project_id => 'project-name'
171
189
172 should_route :get, "/issues/gantt", :controller => 'gantts', :action => 'show'
190 should_route :get, "/issues/gantt", :controller => 'gantts', :action => 'show'
173 should_route :get, "/issues/gantt.pdf", :controller => 'gantts', :action => 'show', :format => 'pdf'
191 should_route :get, "/issues/gantt.pdf", :controller => 'gantts', :action => 'show', :format => 'pdf'
174 should_route :get, "/projects/project-name/issues/gantt", :controller => 'gantts', :action => 'show', :project_id => 'project-name'
192 should_route :get, "/projects/project-name/issues/gantt", :controller => 'gantts', :action => 'show', :project_id => 'project-name'
175 should_route :get, "/projects/project-name/issues/gantt.pdf", :controller => 'gantts', :action => 'show', :project_id => 'project-name', :format => 'pdf'
193 should_route :get, "/projects/project-name/issues/gantt.pdf", :controller => 'gantts', :action => 'show', :project_id => 'project-name', :format => 'pdf'
176
194
177 should_route :get, "/issues/auto_complete", :controller => 'auto_completes', :action => 'issues'
195 should_route :get, "/issues/auto_complete", :controller => 'auto_completes', :action => 'issues'
178
196
179 should_route :get, "/issues/preview/123", :controller => 'previews', :action => 'issue', :id => '123'
197 should_route :get, "/issues/preview/123", :controller => 'previews', :action => 'issue', :id => '123'
180 should_route :post, "/issues/preview/123", :controller => 'previews', :action => 'issue', :id => '123'
198 should_route :post, "/issues/preview/123", :controller => 'previews', :action => 'issue', :id => '123'
181 should_route :get, "/issues/context_menu", :controller => 'context_menus', :action => 'issues'
199 should_route :get, "/issues/context_menu", :controller => 'context_menus', :action => 'issues'
182 should_route :post, "/issues/context_menu", :controller => 'context_menus', :action => 'issues'
200 should_route :post, "/issues/context_menu", :controller => 'context_menus', :action => 'issues'
183
201
184 should_route :get, "/issues/changes", :controller => 'journals', :action => 'index'
202 should_route :get, "/issues/changes", :controller => 'journals', :action => 'index'
185
203
186 should_route :get, "/issues/bulk_edit", :controller => 'issues', :action => 'bulk_edit'
204 should_route :get, "/issues/bulk_edit", :controller => 'issues', :action => 'bulk_edit'
187 should_route :post, "/issues/bulk_update", :controller => 'issues', :action => 'bulk_update'
205 should_route :post, "/issues/bulk_update", :controller => 'issues', :action => 'bulk_update'
188 end
206 end
189
207
190 context "issue categories" do
208 context "issue categories" do
191 should_route :get, "/projects/foo/issue_categories", :controller => 'issue_categories', :action => 'index', :project_id => 'foo'
209 should_route :get, "/projects/foo/issue_categories", :controller => 'issue_categories', :action => 'index', :project_id => 'foo'
192 should_route :get, "/projects/foo/issue_categories.xml", :controller => 'issue_categories', :action => 'index', :project_id => 'foo', :format => 'xml'
210 should_route :get, "/projects/foo/issue_categories.xml", :controller => 'issue_categories', :action => 'index', :project_id => 'foo', :format => 'xml'
193 should_route :get, "/projects/foo/issue_categories.json", :controller => 'issue_categories', :action => 'index', :project_id => 'foo', :format => 'json'
211 should_route :get, "/projects/foo/issue_categories.json", :controller => 'issue_categories', :action => 'index', :project_id => 'foo', :format => 'json'
194
212
195 should_route :get, "/projects/foo/issue_categories/new", :controller => 'issue_categories', :action => 'new', :project_id => 'foo'
213 should_route :get, "/projects/foo/issue_categories/new", :controller => 'issue_categories', :action => 'new', :project_id => 'foo'
196
214
197 should_route :post, "/projects/foo/issue_categories", :controller => 'issue_categories', :action => 'create', :project_id => 'foo'
215 should_route :post, "/projects/foo/issue_categories", :controller => 'issue_categories', :action => 'create', :project_id => 'foo'
198 should_route :post, "/projects/foo/issue_categories.xml", :controller => 'issue_categories', :action => 'create', :project_id => 'foo', :format => 'xml'
216 should_route :post, "/projects/foo/issue_categories.xml", :controller => 'issue_categories', :action => 'create', :project_id => 'foo', :format => 'xml'
199 should_route :post, "/projects/foo/issue_categories.json", :controller => 'issue_categories', :action => 'create', :project_id => 'foo', :format => 'json'
217 should_route :post, "/projects/foo/issue_categories.json", :controller => 'issue_categories', :action => 'create', :project_id => 'foo', :format => 'json'
200
218
201 should_route :get, "/issue_categories/1", :controller => 'issue_categories', :action => 'show', :id => '1'
219 should_route :get, "/issue_categories/1", :controller => 'issue_categories', :action => 'show', :id => '1'
202 should_route :get, "/issue_categories/1.xml", :controller => 'issue_categories', :action => 'show', :id => '1', :format => 'xml'
220 should_route :get, "/issue_categories/1.xml", :controller => 'issue_categories', :action => 'show', :id => '1', :format => 'xml'
203 should_route :get, "/issue_categories/1.json", :controller => 'issue_categories', :action => 'show', :id => '1', :format => 'json'
221 should_route :get, "/issue_categories/1.json", :controller => 'issue_categories', :action => 'show', :id => '1', :format => 'json'
204
222
205 should_route :get, "/issue_categories/1/edit", :controller => 'issue_categories', :action => 'edit', :id => '1'
223 should_route :get, "/issue_categories/1/edit", :controller => 'issue_categories', :action => 'edit', :id => '1'
206
224
207 should_route :put, "/issue_categories/1", :controller => 'issue_categories', :action => 'update', :id => '1'
225 should_route :put, "/issue_categories/1", :controller => 'issue_categories', :action => 'update', :id => '1'
208 should_route :put, "/issue_categories/1.xml", :controller => 'issue_categories', :action => 'update', :id => '1', :format => 'xml'
226 should_route :put, "/issue_categories/1.xml", :controller => 'issue_categories', :action => 'update', :id => '1', :format => 'xml'
209 should_route :put, "/issue_categories/1.json", :controller => 'issue_categories', :action => 'update', :id => '1', :format => 'json'
227 should_route :put, "/issue_categories/1.json", :controller => 'issue_categories', :action => 'update', :id => '1', :format => 'json'
210
228
211 should_route :delete, "/issue_categories/1", :controller => 'issue_categories', :action => 'destroy', :id => '1'
229 should_route :delete, "/issue_categories/1", :controller => 'issue_categories', :action => 'destroy', :id => '1'
212 should_route :delete, "/issue_categories/1.xml", :controller => 'issue_categories', :action => 'destroy', :id => '1', :format => 'xml'
230 should_route :delete, "/issue_categories/1.xml", :controller => 'issue_categories', :action => 'destroy', :id => '1', :format => 'xml'
213 should_route :delete, "/issue_categories/1.json", :controller => 'issue_categories', :action => 'destroy', :id => '1', :format => 'json'
231 should_route :delete, "/issue_categories/1.json", :controller => 'issue_categories', :action => 'destroy', :id => '1', :format => 'json'
214 end
232 end
215
233
216 context "issue relations" do
234 context "issue relations" do
217 should_route :get, "/issues/1/relations", :controller => 'issue_relations', :action => 'index', :issue_id => '1'
235 should_route :get, "/issues/1/relations", :controller => 'issue_relations', :action => 'index', :issue_id => '1'
218 should_route :get, "/issues/1/relations.xml", :controller => 'issue_relations', :action => 'index', :issue_id => '1', :format => 'xml'
236 should_route :get, "/issues/1/relations.xml", :controller => 'issue_relations', :action => 'index', :issue_id => '1', :format => 'xml'
219 should_route :get, "/issues/1/relations.json", :controller => 'issue_relations', :action => 'index', :issue_id => '1', :format => 'json'
237 should_route :get, "/issues/1/relations.json", :controller => 'issue_relations', :action => 'index', :issue_id => '1', :format => 'json'
220
238
221 should_route :post, "/issues/1/relations", :controller => 'issue_relations', :action => 'create', :issue_id => '1'
239 should_route :post, "/issues/1/relations", :controller => 'issue_relations', :action => 'create', :issue_id => '1'
222 should_route :post, "/issues/1/relations.xml", :controller => 'issue_relations', :action => 'create', :issue_id => '1', :format => 'xml'
240 should_route :post, "/issues/1/relations.xml", :controller => 'issue_relations', :action => 'create', :issue_id => '1', :format => 'xml'
223 should_route :post, "/issues/1/relations.json", :controller => 'issue_relations', :action => 'create', :issue_id => '1', :format => 'json'
241 should_route :post, "/issues/1/relations.json", :controller => 'issue_relations', :action => 'create', :issue_id => '1', :format => 'json'
224
242
225 should_route :get, "/relations/23", :controller => 'issue_relations', :action => 'show', :id => '23'
243 should_route :get, "/relations/23", :controller => 'issue_relations', :action => 'show', :id => '23'
226 should_route :get, "/relations/23.xml", :controller => 'issue_relations', :action => 'show', :id => '23', :format => 'xml'
244 should_route :get, "/relations/23.xml", :controller => 'issue_relations', :action => 'show', :id => '23', :format => 'xml'
227 should_route :get, "/relations/23.json", :controller => 'issue_relations', :action => 'show', :id => '23', :format => 'json'
245 should_route :get, "/relations/23.json", :controller => 'issue_relations', :action => 'show', :id => '23', :format => 'json'
228
246
229 should_route :delete, "/relations/23", :controller => 'issue_relations', :action => 'destroy', :id => '23'
247 should_route :delete, "/relations/23", :controller => 'issue_relations', :action => 'destroy', :id => '23'
230 should_route :delete, "/relations/23.xml", :controller => 'issue_relations', :action => 'destroy', :id => '23', :format => 'xml'
248 should_route :delete, "/relations/23.xml", :controller => 'issue_relations', :action => 'destroy', :id => '23', :format => 'xml'
231 should_route :delete, "/relations/23.json", :controller => 'issue_relations', :action => 'destroy', :id => '23', :format => 'json'
249 should_route :delete, "/relations/23.json", :controller => 'issue_relations', :action => 'destroy', :id => '23', :format => 'json'
232 end
250 end
233
251
234 context "issue reports" do
252 context "issue reports" do
235 should_route :get, "/projects/567/issues/report", :controller => 'reports', :action => 'issue_report', :id => '567'
253 should_route :get, "/projects/567/issues/report", :controller => 'reports', :action => 'issue_report', :id => '567'
236 should_route :get, "/projects/567/issues/report/assigned_to", :controller => 'reports', :action => 'issue_report_details', :id => '567', :detail => 'assigned_to'
254 should_route :get, "/projects/567/issues/report/assigned_to", :controller => 'reports', :action => 'issue_report_details', :id => '567', :detail => 'assigned_to'
237 end
255 end
238
256
239 context "members" do
257 context "members" do
240 should_route :post, "/projects/5234/members/new", :controller => 'members', :action => 'new', :id => '5234'
258 should_route :post, "/projects/5234/members/new", :controller => 'members', :action => 'new', :id => '5234'
241 end
259 end
242
260
243 context "messages" do
261 context "messages" do
244 should_route :get, "/boards/22/topics/2", :controller => 'messages', :action => 'show', :id => '2', :board_id => '22'
262 should_route :get, "/boards/22/topics/2", :controller => 'messages', :action => 'show', :id => '2', :board_id => '22'
245 should_route :get, "/boards/lala/topics/new", :controller => 'messages', :action => 'new', :board_id => 'lala'
263 should_route :get, "/boards/lala/topics/new", :controller => 'messages', :action => 'new', :board_id => 'lala'
246 should_route :get, "/boards/lala/topics/22/edit", :controller => 'messages', :action => 'edit', :id => '22', :board_id => 'lala'
264 should_route :get, "/boards/lala/topics/22/edit", :controller => 'messages', :action => 'edit', :id => '22', :board_id => 'lala'
247
265
248 should_route :post, "/boards/lala/topics/new", :controller => 'messages', :action => 'new', :board_id => 'lala'
266 should_route :post, "/boards/lala/topics/new", :controller => 'messages', :action => 'new', :board_id => 'lala'
249 should_route :post, "/boards/lala/topics/22/edit", :controller => 'messages', :action => 'edit', :id => '22', :board_id => 'lala'
267 should_route :post, "/boards/lala/topics/22/edit", :controller => 'messages', :action => 'edit', :id => '22', :board_id => 'lala'
250 should_route :post, "/boards/22/topics/555/replies", :controller => 'messages', :action => 'reply', :id => '555', :board_id => '22'
268 should_route :post, "/boards/22/topics/555/replies", :controller => 'messages', :action => 'reply', :id => '555', :board_id => '22'
251 should_route :post, "/boards/22/topics/555/destroy", :controller => 'messages', :action => 'destroy', :id => '555', :board_id => '22'
269 should_route :post, "/boards/22/topics/555/destroy", :controller => 'messages', :action => 'destroy', :id => '555', :board_id => '22'
252 end
270 end
253
271
254 context "news" do
272 context "news" do
255 should_route :get, "/news", :controller => 'news', :action => 'index'
273 should_route :get, "/news", :controller => 'news', :action => 'index'
256 should_route :get, "/news.atom", :controller => 'news', :action => 'index', :format => 'atom'
274 should_route :get, "/news.atom", :controller => 'news', :action => 'index', :format => 'atom'
257 should_route :get, "/news.xml", :controller => 'news', :action => 'index', :format => 'xml'
275 should_route :get, "/news.xml", :controller => 'news', :action => 'index', :format => 'xml'
258 should_route :get, "/news.json", :controller => 'news', :action => 'index', :format => 'json'
276 should_route :get, "/news.json", :controller => 'news', :action => 'index', :format => 'json'
259 should_route :get, "/projects/567/news", :controller => 'news', :action => 'index', :project_id => '567'
277 should_route :get, "/projects/567/news", :controller => 'news', :action => 'index', :project_id => '567'
260 should_route :get, "/projects/567/news.atom", :controller => 'news', :action => 'index', :format => 'atom', :project_id => '567'
278 should_route :get, "/projects/567/news.atom", :controller => 'news', :action => 'index', :format => 'atom', :project_id => '567'
261 should_route :get, "/projects/567/news.xml", :controller => 'news', :action => 'index', :format => 'xml', :project_id => '567'
279 should_route :get, "/projects/567/news.xml", :controller => 'news', :action => 'index', :format => 'xml', :project_id => '567'
262 should_route :get, "/projects/567/news.json", :controller => 'news', :action => 'index', :format => 'json', :project_id => '567'
280 should_route :get, "/projects/567/news.json", :controller => 'news', :action => 'index', :format => 'json', :project_id => '567'
263 should_route :get, "/news/2", :controller => 'news', :action => 'show', :id => '2'
281 should_route :get, "/news/2", :controller => 'news', :action => 'show', :id => '2'
264 should_route :get, "/projects/567/news/new", :controller => 'news', :action => 'new', :project_id => '567'
282 should_route :get, "/projects/567/news/new", :controller => 'news', :action => 'new', :project_id => '567'
265 should_route :get, "/news/234", :controller => 'news', :action => 'show', :id => '234'
283 should_route :get, "/news/234", :controller => 'news', :action => 'show', :id => '234'
266 should_route :get, "/news/567/edit", :controller => 'news', :action => 'edit', :id => '567'
284 should_route :get, "/news/567/edit", :controller => 'news', :action => 'edit', :id => '567'
267 should_route :get, "/news/preview", :controller => 'previews', :action => 'news'
285 should_route :get, "/news/preview", :controller => 'previews', :action => 'news'
268
286
269 should_route :post, "/projects/567/news", :controller => 'news', :action => 'create', :project_id => '567'
287 should_route :post, "/projects/567/news", :controller => 'news', :action => 'create', :project_id => '567'
270 should_route :post, "/news/567/comments", :controller => 'comments', :action => 'create', :id => '567'
288 should_route :post, "/news/567/comments", :controller => 'comments', :action => 'create', :id => '567'
271
289
272 should_route :put, "/news/567", :controller => 'news', :action => 'update', :id => '567'
290 should_route :put, "/news/567", :controller => 'news', :action => 'update', :id => '567'
273
291
274 should_route :delete, "/news/567", :controller => 'news', :action => 'destroy', :id => '567'
292 should_route :delete, "/news/567", :controller => 'news', :action => 'destroy', :id => '567'
275 should_route :delete, "/news/567/comments/15", :controller => 'comments', :action => 'destroy', :id => '567', :comment_id => '15'
293 should_route :delete, "/news/567/comments/15", :controller => 'comments', :action => 'destroy', :id => '567', :comment_id => '15'
276 end
294 end
277
295
278 context "projects" do
296 context "projects" do
279 should_route :get, "/projects", :controller => 'projects', :action => 'index'
297 should_route :get, "/projects", :controller => 'projects', :action => 'index'
280 should_route :get, "/projects.atom", :controller => 'projects', :action => 'index', :format => 'atom'
298 should_route :get, "/projects.atom", :controller => 'projects', :action => 'index', :format => 'atom'
281 should_route :get, "/projects.xml", :controller => 'projects', :action => 'index', :format => 'xml'
299 should_route :get, "/projects.xml", :controller => 'projects', :action => 'index', :format => 'xml'
282 should_route :get, "/projects/new", :controller => 'projects', :action => 'new'
300 should_route :get, "/projects/new", :controller => 'projects', :action => 'new'
283 should_route :get, "/projects/test", :controller => 'projects', :action => 'show', :id => 'test'
301 should_route :get, "/projects/test", :controller => 'projects', :action => 'show', :id => 'test'
284 should_route :get, "/projects/1.xml", :controller => 'projects', :action => 'show', :id => '1', :format => 'xml'
302 should_route :get, "/projects/1.xml", :controller => 'projects', :action => 'show', :id => '1', :format => 'xml'
285 should_route :get, "/projects/4223/settings", :controller => 'projects', :action => 'settings', :id => '4223'
303 should_route :get, "/projects/4223/settings", :controller => 'projects', :action => 'settings', :id => '4223'
286 should_route :get, "/projects/4223/settings/members", :controller => 'projects', :action => 'settings', :id => '4223', :tab => 'members'
304 should_route :get, "/projects/4223/settings/members", :controller => 'projects', :action => 'settings', :id => '4223', :tab => 'members'
287 should_route :get, "/projects/33/files", :controller => 'files', :action => 'index', :project_id => '33'
305 should_route :get, "/projects/33/files", :controller => 'files', :action => 'index', :project_id => '33'
288 should_route :get, "/projects/33/files/new", :controller => 'files', :action => 'new', :project_id => '33'
306 should_route :get, "/projects/33/files/new", :controller => 'files', :action => 'new', :project_id => '33'
289 should_route :get, "/projects/33/roadmap", :controller => 'versions', :action => 'index', :project_id => '33'
307 should_route :get, "/projects/33/roadmap", :controller => 'versions', :action => 'index', :project_id => '33'
290 should_route :get, "/projects/33/activity", :controller => 'activities', :action => 'index', :id => '33'
308 should_route :get, "/projects/33/activity", :controller => 'activities', :action => 'index', :id => '33'
291 should_route :get, "/projects/33/activity.atom", :controller => 'activities', :action => 'index', :id => '33', :format => 'atom'
309 should_route :get, "/projects/33/activity.atom", :controller => 'activities', :action => 'index', :id => '33', :format => 'atom'
292
310
293 should_route :post, "/projects", :controller => 'projects', :action => 'create'
311 should_route :post, "/projects", :controller => 'projects', :action => 'create'
294 should_route :post, "/projects.xml", :controller => 'projects', :action => 'create', :format => 'xml'
312 should_route :post, "/projects.xml", :controller => 'projects', :action => 'create', :format => 'xml'
295 should_route :post, "/projects/33/files", :controller => 'files', :action => 'create', :project_id => '33'
313 should_route :post, "/projects/33/files", :controller => 'files', :action => 'create', :project_id => '33'
296 should_route :post, "/projects/64/archive", :controller => 'projects', :action => 'archive', :id => '64'
314 should_route :post, "/projects/64/archive", :controller => 'projects', :action => 'archive', :id => '64'
297 should_route :post, "/projects/64/unarchive", :controller => 'projects', :action => 'unarchive', :id => '64'
315 should_route :post, "/projects/64/unarchive", :controller => 'projects', :action => 'unarchive', :id => '64'
298
316
299 should_route :put, "/projects/64/enumerations", :controller => 'project_enumerations', :action => 'update', :project_id => '64'
317 should_route :put, "/projects/64/enumerations", :controller => 'project_enumerations', :action => 'update', :project_id => '64'
300 should_route :put, "/projects/4223", :controller => 'projects', :action => 'update', :id => '4223'
318 should_route :put, "/projects/4223", :controller => 'projects', :action => 'update', :id => '4223'
301 should_route :put, "/projects/1.xml", :controller => 'projects', :action => 'update', :id => '1', :format => 'xml'
319 should_route :put, "/projects/1.xml", :controller => 'projects', :action => 'update', :id => '1', :format => 'xml'
302
320
303 should_route :delete, "/projects/64", :controller => 'projects', :action => 'destroy', :id => '64'
321 should_route :delete, "/projects/64", :controller => 'projects', :action => 'destroy', :id => '64'
304 should_route :delete, "/projects/1.xml", :controller => 'projects', :action => 'destroy', :id => '1', :format => 'xml'
322 should_route :delete, "/projects/1.xml", :controller => 'projects', :action => 'destroy', :id => '1', :format => 'xml'
305 should_route :delete, "/projects/64/enumerations", :controller => 'project_enumerations', :action => 'destroy', :project_id => '64'
323 should_route :delete, "/projects/64/enumerations", :controller => 'project_enumerations', :action => 'destroy', :project_id => '64'
306 end
324 end
307
325
308 context "queries" do
326 context "queries" do
309 should_route :get, "/queries.xml", :controller => 'queries', :action => 'index', :format => 'xml'
327 should_route :get, "/queries.xml", :controller => 'queries', :action => 'index', :format => 'xml'
310 should_route :get, "/queries.json", :controller => 'queries', :action => 'index', :format => 'json'
328 should_route :get, "/queries.json", :controller => 'queries', :action => 'index', :format => 'json'
311
329
312 should_route :get, "/queries/new", :controller => 'queries', :action => 'new'
330 should_route :get, "/queries/new", :controller => 'queries', :action => 'new'
313 should_route :get, "/projects/redmine/queries/new", :controller => 'queries', :action => 'new', :project_id => 'redmine'
331 should_route :get, "/projects/redmine/queries/new", :controller => 'queries', :action => 'new', :project_id => 'redmine'
314
332
315 should_route :post, "/queries", :controller => 'queries', :action => 'create'
333 should_route :post, "/queries", :controller => 'queries', :action => 'create'
316 should_route :post, "/projects/redmine/queries", :controller => 'queries', :action => 'create', :project_id => 'redmine'
334 should_route :post, "/projects/redmine/queries", :controller => 'queries', :action => 'create', :project_id => 'redmine'
317
335
318 should_route :get, "/queries/1/edit", :controller => 'queries', :action => 'edit', :id => '1'
336 should_route :get, "/queries/1/edit", :controller => 'queries', :action => 'edit', :id => '1'
319
337
320 should_route :put, "/queries/1", :controller => 'queries', :action => 'update', :id => '1'
338 should_route :put, "/queries/1", :controller => 'queries', :action => 'update', :id => '1'
321
339
322 should_route :delete, "/queries/1", :controller => 'queries', :action => 'destroy', :id => '1'
340 should_route :delete, "/queries/1", :controller => 'queries', :action => 'destroy', :id => '1'
323 end
341 end
324
342
325 context "repositories" do
343 context "repositories" do
326 should_route :get, "/projects/redmine/repository", :controller => 'repositories', :action => 'show', :id => 'redmine'
344 should_route :get, "/projects/redmine/repository", :controller => 'repositories', :action => 'show', :id => 'redmine'
327 should_route :get, "/projects/redmine/repository/edit", :controller => 'repositories', :action => 'edit', :id => 'redmine'
345 should_route :get, "/projects/redmine/repository/edit", :controller => 'repositories', :action => 'edit', :id => 'redmine'
328 should_route :get, "/projects/redmine/repository/revisions", :controller => 'repositories', :action => 'revisions', :id => 'redmine'
346 should_route :get, "/projects/redmine/repository/revisions", :controller => 'repositories', :action => 'revisions', :id => 'redmine'
329 should_route :get, "/projects/redmine/repository/revisions.atom", :controller => 'repositories', :action => 'revisions', :id => 'redmine', :format => 'atom'
347 should_route :get, "/projects/redmine/repository/revisions.atom", :controller => 'repositories', :action => 'revisions', :id => 'redmine', :format => 'atom'
330 should_route :get, "/projects/redmine/repository/revisions/2457", :controller => 'repositories', :action => 'revision', :id => 'redmine', :rev => '2457'
348 should_route :get, "/projects/redmine/repository/revisions/2457", :controller => 'repositories', :action => 'revision', :id => 'redmine', :rev => '2457'
331 should_route :get, "/projects/redmine/repository/revisions/2457/diff", :controller => 'repositories', :action => 'diff', :id => 'redmine', :rev => '2457'
349 should_route :get, "/projects/redmine/repository/revisions/2457/diff", :controller => 'repositories', :action => 'diff', :id => 'redmine', :rev => '2457'
332 should_route :get, "/projects/redmine/repository/revisions/2457/diff.diff", :controller => 'repositories', :action => 'diff', :id => 'redmine', :rev => '2457', :format => 'diff'
350 should_route :get, "/projects/redmine/repository/revisions/2457/diff.diff", :controller => 'repositories', :action => 'diff', :id => 'redmine', :rev => '2457', :format => 'diff'
333 should_route :get, "/projects/redmine/repository/diff/path/to/file.c", :controller => 'repositories', :action => 'diff', :id => 'redmine', :path => %w[path to file.c]
351 should_route :get, "/projects/redmine/repository/diff/path/to/file.c", :controller => 'repositories', :action => 'diff', :id => 'redmine', :path => %w[path to file.c]
334 should_route :get, "/projects/redmine/repository/revisions/2/diff/path/to/file.c", :controller => 'repositories', :action => 'diff', :id => 'redmine', :path => %w[path to file.c], :rev => '2'
352 should_route :get, "/projects/redmine/repository/revisions/2/diff/path/to/file.c", :controller => 'repositories', :action => 'diff', :id => 'redmine', :path => %w[path to file.c], :rev => '2'
335 should_route :get, "/projects/redmine/repository/browse/path/to/file.c", :controller => 'repositories', :action => 'browse', :id => 'redmine', :path => %w[path to file.c]
353 should_route :get, "/projects/redmine/repository/browse/path/to/file.c", :controller => 'repositories', :action => 'browse', :id => 'redmine', :path => %w[path to file.c]
336 should_route :get, "/projects/redmine/repository/entry/path/to/file.c", :controller => 'repositories', :action => 'entry', :id => 'redmine', :path => %w[path to file.c]
354 should_route :get, "/projects/redmine/repository/entry/path/to/file.c", :controller => 'repositories', :action => 'entry', :id => 'redmine', :path => %w[path to file.c]
337 should_route :get, "/projects/redmine/repository/revisions/2/entry/path/to/file.c", :controller => 'repositories', :action => 'entry', :id => 'redmine', :path => %w[path to file.c], :rev => '2'
355 should_route :get, "/projects/redmine/repository/revisions/2/entry/path/to/file.c", :controller => 'repositories', :action => 'entry', :id => 'redmine', :path => %w[path to file.c], :rev => '2'
338 should_route :get, "/projects/redmine/repository/raw/path/to/file.c", :controller => 'repositories', :action => 'entry', :id => 'redmine', :path => %w[path to file.c], :format => 'raw'
356 should_route :get, "/projects/redmine/repository/raw/path/to/file.c", :controller => 'repositories', :action => 'entry', :id => 'redmine', :path => %w[path to file.c], :format => 'raw'
339 should_route :get, "/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'
357 should_route :get, "/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'
340 should_route :get, "/projects/redmine/repository/annotate/path/to/file.c", :controller => 'repositories', :action => 'annotate', :id => 'redmine', :path => %w[path to file.c]
358 should_route :get, "/projects/redmine/repository/annotate/path/to/file.c", :controller => 'repositories', :action => 'annotate', :id => 'redmine', :path => %w[path to file.c]
341 should_route :get, "/projects/redmine/repository/changes/path/to/file.c", :controller => 'repositories', :action => 'changes', :id => 'redmine', :path => %w[path to file.c]
359 should_route :get, "/projects/redmine/repository/changes/path/to/file.c", :controller => 'repositories', :action => 'changes', :id => 'redmine', :path => %w[path to file.c]
342 should_route :get, "/projects/redmine/repository/statistics", :controller => 'repositories', :action => 'stats', :id => 'redmine'
360 should_route :get, "/projects/redmine/repository/statistics", :controller => 'repositories', :action => 'stats', :id => 'redmine'
343
361
344 should_route :post, "/projects/redmine/repository/edit", :controller => 'repositories', :action => 'edit', :id => 'redmine'
362 should_route :post, "/projects/redmine/repository/edit", :controller => 'repositories', :action => 'edit', :id => 'redmine'
345 end
363 end
346
364
347 context "roles" do
365 context "roles" do
348 should_route :get, "/roles", :controller => 'roles', :action => 'index'
366 should_route :get, "/roles", :controller => 'roles', :action => 'index'
349 should_route :get, "/roles/new", :controller => 'roles', :action => 'new'
367 should_route :get, "/roles/new", :controller => 'roles', :action => 'new'
350 should_route :post, "/roles", :controller => 'roles', :action => 'create'
368 should_route :post, "/roles", :controller => 'roles', :action => 'create'
351 should_route :get, "/roles/2/edit", :controller => 'roles', :action => 'edit', :id => 2
369 should_route :get, "/roles/2/edit", :controller => 'roles', :action => 'edit', :id => 2
352 should_route :put, "/roles/2", :controller => 'roles', :action => 'update', :id => 2
370 should_route :put, "/roles/2", :controller => 'roles', :action => 'update', :id => 2
353 should_route :delete, "/roles/2", :controller => 'roles', :action => 'destroy', :id => 2
371 should_route :delete, "/roles/2", :controller => 'roles', :action => 'destroy', :id => 2
354 should_route :get, "/roles/permissions", :controller => 'roles', :action => 'permissions'
372 should_route :get, "/roles/permissions", :controller => 'roles', :action => 'permissions'
355 should_route :post, "/roles/permissions", :controller => 'roles', :action => 'permissions'
373 should_route :post, "/roles/permissions", :controller => 'roles', :action => 'permissions'
356 end
374 end
357
375
358 context "timelogs (global)" do
376 context "timelogs (global)" do
359 should_route :get, "/time_entries", :controller => 'timelog', :action => 'index'
377 should_route :get, "/time_entries", :controller => 'timelog', :action => 'index'
360 should_route :get, "/time_entries.csv", :controller => 'timelog', :action => 'index', :format => 'csv'
378 should_route :get, "/time_entries.csv", :controller => 'timelog', :action => 'index', :format => 'csv'
361 should_route :get, "/time_entries.atom", :controller => 'timelog', :action => 'index', :format => 'atom'
379 should_route :get, "/time_entries.atom", :controller => 'timelog', :action => 'index', :format => 'atom'
362 should_route :get, "/time_entries/new", :controller => 'timelog', :action => 'new'
380 should_route :get, "/time_entries/new", :controller => 'timelog', :action => 'new'
363 should_route :get, "/time_entries/22/edit", :controller => 'timelog', :action => 'edit', :id => '22'
381 should_route :get, "/time_entries/22/edit", :controller => 'timelog', :action => 'edit', :id => '22'
364
382
365 should_route :post, "/time_entries", :controller => 'timelog', :action => 'create'
383 should_route :post, "/time_entries", :controller => 'timelog', :action => 'create'
366
384
367 should_route :put, "/time_entries/22", :controller => 'timelog', :action => 'update', :id => '22'
385 should_route :put, "/time_entries/22", :controller => 'timelog', :action => 'update', :id => '22'
368
386
369 should_route :delete, "/time_entries/55", :controller => 'timelog', :action => 'destroy', :id => '55'
387 should_route :delete, "/time_entries/55", :controller => 'timelog', :action => 'destroy', :id => '55'
370 end
388 end
371
389
372 context "timelogs (scoped under project)" do
390 context "timelogs (scoped under project)" do
373 should_route :get, "/projects/567/time_entries", :controller => 'timelog', :action => 'index', :project_id => '567'
391 should_route :get, "/projects/567/time_entries", :controller => 'timelog', :action => 'index', :project_id => '567'
374 should_route :get, "/projects/567/time_entries.csv", :controller => 'timelog', :action => 'index', :project_id => '567', :format => 'csv'
392 should_route :get, "/projects/567/time_entries.csv", :controller => 'timelog', :action => 'index', :project_id => '567', :format => 'csv'
375 should_route :get, "/projects/567/time_entries.atom", :controller => 'timelog', :action => 'index', :project_id => '567', :format => 'atom'
393 should_route :get, "/projects/567/time_entries.atom", :controller => 'timelog', :action => 'index', :project_id => '567', :format => 'atom'
376 should_route :get, "/projects/567/time_entries/new", :controller => 'timelog', :action => 'new', :project_id => '567'
394 should_route :get, "/projects/567/time_entries/new", :controller => 'timelog', :action => 'new', :project_id => '567'
377 should_route :get, "/projects/567/time_entries/22/edit", :controller => 'timelog', :action => 'edit', :id => '22', :project_id => '567'
395 should_route :get, "/projects/567/time_entries/22/edit", :controller => 'timelog', :action => 'edit', :id => '22', :project_id => '567'
378
396
379 should_route :post, "/projects/567/time_entries", :controller => 'timelog', :action => 'create', :project_id => '567'
397 should_route :post, "/projects/567/time_entries", :controller => 'timelog', :action => 'create', :project_id => '567'
380
398
381 should_route :put, "/projects/567/time_entries/22", :controller => 'timelog', :action => 'update', :id => '22', :project_id => '567'
399 should_route :put, "/projects/567/time_entries/22", :controller => 'timelog', :action => 'update', :id => '22', :project_id => '567'
382
400
383 should_route :delete, "/projects/567/time_entries/55", :controller => 'timelog', :action => 'destroy', :id => '55', :project_id => '567'
401 should_route :delete, "/projects/567/time_entries/55", :controller => 'timelog', :action => 'destroy', :id => '55', :project_id => '567'
384 end
402 end
385
403
386 context "timelogs (scoped under issues)" do
404 context "timelogs (scoped under issues)" do
387 should_route :get, "/issues/234/time_entries", :controller => 'timelog', :action => 'index', :issue_id => '234'
405 should_route :get, "/issues/234/time_entries", :controller => 'timelog', :action => 'index', :issue_id => '234'
388 should_route :get, "/issues/234/time_entries.csv", :controller => 'timelog', :action => 'index', :issue_id => '234', :format => 'csv'
406 should_route :get, "/issues/234/time_entries.csv", :controller => 'timelog', :action => 'index', :issue_id => '234', :format => 'csv'
389 should_route :get, "/issues/234/time_entries.atom", :controller => 'timelog', :action => 'index', :issue_id => '234', :format => 'atom'
407 should_route :get, "/issues/234/time_entries.atom", :controller => 'timelog', :action => 'index', :issue_id => '234', :format => 'atom'
390 should_route :get, "/issues/234/time_entries/new", :controller => 'timelog', :action => 'new', :issue_id => '234'
408 should_route :get, "/issues/234/time_entries/new", :controller => 'timelog', :action => 'new', :issue_id => '234'
391 should_route :get, "/issues/234/time_entries/22/edit", :controller => 'timelog', :action => 'edit', :id => '22', :issue_id => '234'
409 should_route :get, "/issues/234/time_entries/22/edit", :controller => 'timelog', :action => 'edit', :id => '22', :issue_id => '234'
392
410
393 should_route :post, "/issues/234/time_entries", :controller => 'timelog', :action => 'create', :issue_id => '234'
411 should_route :post, "/issues/234/time_entries", :controller => 'timelog', :action => 'create', :issue_id => '234'
394
412
395 should_route :put, "/issues/234/time_entries/22", :controller => 'timelog', :action => 'update', :id => '22', :issue_id => '234'
413 should_route :put, "/issues/234/time_entries/22", :controller => 'timelog', :action => 'update', :id => '22', :issue_id => '234'
396
414
397 should_route :delete, "/issues/234/time_entries/55", :controller => 'timelog', :action => 'destroy', :id => '55', :issue_id => '234'
415 should_route :delete, "/issues/234/time_entries/55", :controller => 'timelog', :action => 'destroy', :id => '55', :issue_id => '234'
398 end
416 end
399
417
400 context "timelogs (scoped under project and issues)" do
418 context "timelogs (scoped under project and issues)" do
401 should_route :get, "/projects/ecookbook/issues/234/time_entries", :controller => 'timelog', :action => 'index', :issue_id => '234', :project_id => 'ecookbook'
419 should_route :get, "/projects/ecookbook/issues/234/time_entries", :controller => 'timelog', :action => 'index', :issue_id => '234', :project_id => 'ecookbook'
402 should_route :get, "/projects/ecookbook/issues/234/time_entries.csv", :controller => 'timelog', :action => 'index', :issue_id => '234', :project_id => 'ecookbook', :format => 'csv'
420 should_route :get, "/projects/ecookbook/issues/234/time_entries.csv", :controller => 'timelog', :action => 'index', :issue_id => '234', :project_id => 'ecookbook', :format => 'csv'
403 should_route :get, "/projects/ecookbook/issues/234/time_entries.atom", :controller => 'timelog', :action => 'index', :issue_id => '234', :project_id => 'ecookbook', :format => 'atom'
421 should_route :get, "/projects/ecookbook/issues/234/time_entries.atom", :controller => 'timelog', :action => 'index', :issue_id => '234', :project_id => 'ecookbook', :format => 'atom'
404 should_route :get, "/projects/ecookbook/issues/234/time_entries/new", :controller => 'timelog', :action => 'new', :issue_id => '234', :project_id => 'ecookbook'
422 should_route :get, "/projects/ecookbook/issues/234/time_entries/new", :controller => 'timelog', :action => 'new', :issue_id => '234', :project_id => 'ecookbook'
405 should_route :get, "/projects/ecookbook/issues/234/time_entries/22/edit", :controller => 'timelog', :action => 'edit', :id => '22', :issue_id => '234', :project_id => 'ecookbook'
423 should_route :get, "/projects/ecookbook/issues/234/time_entries/22/edit", :controller => 'timelog', :action => 'edit', :id => '22', :issue_id => '234', :project_id => 'ecookbook'
406
424
407 should_route :post, "/projects/ecookbook/issues/234/time_entries", :controller => 'timelog', :action => 'create', :issue_id => '234', :project_id => 'ecookbook'
425 should_route :post, "/projects/ecookbook/issues/234/time_entries", :controller => 'timelog', :action => 'create', :issue_id => '234', :project_id => 'ecookbook'
408
426
409 should_route :put, "/projects/ecookbook/issues/234/time_entries/22", :controller => 'timelog', :action => 'update', :id => '22', :issue_id => '234', :project_id => 'ecookbook'
427 should_route :put, "/projects/ecookbook/issues/234/time_entries/22", :controller => 'timelog', :action => 'update', :id => '22', :issue_id => '234', :project_id => 'ecookbook'
410
428
411 should_route :delete, "/projects/ecookbook/issues/234/time_entries/55", :controller => 'timelog', :action => 'destroy', :id => '55', :issue_id => '234', :project_id => 'ecookbook'
429 should_route :delete, "/projects/ecookbook/issues/234/time_entries/55", :controller => 'timelog', :action => 'destroy', :id => '55', :issue_id => '234', :project_id => 'ecookbook'
412
430
413 should_route :get, "/time_entries/report", :controller => 'timelog', :action => 'report'
431 should_route :get, "/time_entries/report", :controller => 'timelog', :action => 'report'
414 should_route :get, "/projects/567/time_entries/report", :controller => 'timelog', :action => 'report', :project_id => '567'
432 should_route :get, "/projects/567/time_entries/report", :controller => 'timelog', :action => 'report', :project_id => '567'
415 should_route :get, "/projects/567/time_entries/report.csv", :controller => 'timelog', :action => 'report', :project_id => '567', :format => 'csv'
433 should_route :get, "/projects/567/time_entries/report.csv", :controller => 'timelog', :action => 'report', :project_id => '567', :format => 'csv'
416 end
434 end
417
435
418 context "users" do
436 context "users" do
419 should_route :get, "/users", :controller => 'users', :action => 'index'
437 should_route :get, "/users", :controller => 'users', :action => 'index'
420 should_route :get, "/users.xml", :controller => 'users', :action => 'index', :format => 'xml'
438 should_route :get, "/users.xml", :controller => 'users', :action => 'index', :format => 'xml'
421 should_route :get, "/users/44", :controller => 'users', :action => 'show', :id => '44'
439 should_route :get, "/users/44", :controller => 'users', :action => 'show', :id => '44'
422 should_route :get, "/users/44.xml", :controller => 'users', :action => 'show', :id => '44', :format => 'xml'
440 should_route :get, "/users/44.xml", :controller => 'users', :action => 'show', :id => '44', :format => 'xml'
423 should_route :get, "/users/current", :controller => 'users', :action => 'show', :id => 'current'
441 should_route :get, "/users/current", :controller => 'users', :action => 'show', :id => 'current'
424 should_route :get, "/users/current.xml", :controller => 'users', :action => 'show', :id => 'current', :format => 'xml'
442 should_route :get, "/users/current.xml", :controller => 'users', :action => 'show', :id => 'current', :format => 'xml'
425 should_route :get, "/users/new", :controller => 'users', :action => 'new'
443 should_route :get, "/users/new", :controller => 'users', :action => 'new'
426 should_route :get, "/users/444/edit", :controller => 'users', :action => 'edit', :id => '444'
444 should_route :get, "/users/444/edit", :controller => 'users', :action => 'edit', :id => '444'
427
445
428 should_route :post, "/users", :controller => 'users', :action => 'create'
446 should_route :post, "/users", :controller => 'users', :action => 'create'
429 should_route :post, "/users.xml", :controller => 'users', :action => 'create', :format => 'xml'
447 should_route :post, "/users.xml", :controller => 'users', :action => 'create', :format => 'xml'
430
448
431 should_route :put, "/users/444", :controller => 'users', :action => 'update', :id => '444'
449 should_route :put, "/users/444", :controller => 'users', :action => 'update', :id => '444'
432 should_route :put, "/users/444.xml", :controller => 'users', :action => 'update', :id => '444', :format => 'xml'
450 should_route :put, "/users/444.xml", :controller => 'users', :action => 'update', :id => '444', :format => 'xml'
433
451
434 should_route :delete, "/users/44", :controller => 'users', :action => 'destroy', :id => '44'
452 should_route :delete, "/users/44", :controller => 'users', :action => 'destroy', :id => '44'
435 should_route :delete, "/users/44.xml", :controller => 'users', :action => 'destroy', :id => '44', :format => 'xml'
453 should_route :delete, "/users/44.xml", :controller => 'users', :action => 'destroy', :id => '44', :format => 'xml'
436
454
437 should_route :post, "/users/123/memberships", :controller => 'users', :action => 'edit_membership', :id => '123'
455 should_route :post, "/users/123/memberships", :controller => 'users', :action => 'edit_membership', :id => '123'
438 should_route :put, "/users/123/memberships/55", :controller => 'users', :action => 'edit_membership', :id => '123', :membership_id => '55'
456 should_route :put, "/users/123/memberships/55", :controller => 'users', :action => 'edit_membership', :id => '123', :membership_id => '55'
439 should_route :delete, "/users/123/memberships/55", :controller => 'users', :action => 'destroy_membership', :id => '123', :membership_id => '55'
457 should_route :delete, "/users/123/memberships/55", :controller => 'users', :action => 'destroy_membership', :id => '123', :membership_id => '55'
440 end
458 end
441
459
442 context "versions" do
460 context "versions" do
443 # /projects/foo/versions is /projects/foo/roadmap
461 # /projects/foo/versions is /projects/foo/roadmap
444 should_route :get, "/projects/foo/versions.xml", :controller => 'versions', :action => 'index', :project_id => 'foo', :format => 'xml'
462 should_route :get, "/projects/foo/versions.xml", :controller => 'versions', :action => 'index', :project_id => 'foo', :format => 'xml'
445 should_route :get, "/projects/foo/versions.json", :controller => 'versions', :action => 'index', :project_id => 'foo', :format => 'json'
463 should_route :get, "/projects/foo/versions.json", :controller => 'versions', :action => 'index', :project_id => 'foo', :format => 'json'
446
464
447 should_route :get, "/projects/foo/versions/new", :controller => 'versions', :action => 'new', :project_id => 'foo'
465 should_route :get, "/projects/foo/versions/new", :controller => 'versions', :action => 'new', :project_id => 'foo'
448
466
449 should_route :post, "/projects/foo/versions", :controller => 'versions', :action => 'create', :project_id => 'foo'
467 should_route :post, "/projects/foo/versions", :controller => 'versions', :action => 'create', :project_id => 'foo'
450 should_route :post, "/projects/foo/versions.xml", :controller => 'versions', :action => 'create', :project_id => 'foo', :format => 'xml'
468 should_route :post, "/projects/foo/versions.xml", :controller => 'versions', :action => 'create', :project_id => 'foo', :format => 'xml'
451 should_route :post, "/projects/foo/versions.json", :controller => 'versions', :action => 'create', :project_id => 'foo', :format => 'json'
469 should_route :post, "/projects/foo/versions.json", :controller => 'versions', :action => 'create', :project_id => 'foo', :format => 'json'
452
470
453 should_route :get, "/versions/1", :controller => 'versions', :action => 'show', :id => '1'
471 should_route :get, "/versions/1", :controller => 'versions', :action => 'show', :id => '1'
454 should_route :get, "/versions/1.xml", :controller => 'versions', :action => 'show', :id => '1', :format => 'xml'
472 should_route :get, "/versions/1.xml", :controller => 'versions', :action => 'show', :id => '1', :format => 'xml'
455 should_route :get, "/versions/1.json", :controller => 'versions', :action => 'show', :id => '1', :format => 'json'
473 should_route :get, "/versions/1.json", :controller => 'versions', :action => 'show', :id => '1', :format => 'json'
456
474
457 should_route :get, "/versions/1/edit", :controller => 'versions', :action => 'edit', :id => '1'
475 should_route :get, "/versions/1/edit", :controller => 'versions', :action => 'edit', :id => '1'
458
476
459 should_route :put, "/versions/1", :controller => 'versions', :action => 'update', :id => '1'
477 should_route :put, "/versions/1", :controller => 'versions', :action => 'update', :id => '1'
460 should_route :put, "/versions/1.xml", :controller => 'versions', :action => 'update', :id => '1', :format => 'xml'
478 should_route :put, "/versions/1.xml", :controller => 'versions', :action => 'update', :id => '1', :format => 'xml'
461 should_route :put, "/versions/1.json", :controller => 'versions', :action => 'update', :id => '1', :format => 'json'
479 should_route :put, "/versions/1.json", :controller => 'versions', :action => 'update', :id => '1', :format => 'json'
462
480
463 should_route :delete, "/versions/1", :controller => 'versions', :action => 'destroy', :id => '1'
481 should_route :delete, "/versions/1", :controller => 'versions', :action => 'destroy', :id => '1'
464 should_route :delete, "/versions/1.xml", :controller => 'versions', :action => 'destroy', :id => '1', :format => 'xml'
482 should_route :delete, "/versions/1.xml", :controller => 'versions', :action => 'destroy', :id => '1', :format => 'xml'
465 should_route :delete, "/versions/1.json", :controller => 'versions', :action => 'destroy', :id => '1', :format => 'json'
483 should_route :delete, "/versions/1.json", :controller => 'versions', :action => 'destroy', :id => '1', :format => 'json'
466
484
467 should_route :put, "/projects/foo/versions/close_completed", :controller => 'versions', :action => 'close_completed', :project_id => 'foo'
485 should_route :put, "/projects/foo/versions/close_completed", :controller => 'versions', :action => 'close_completed', :project_id => 'foo'
468 should_route :post, "/versions/1/status_by", :controller => 'versions', :action => 'status_by', :id => '1'
486 should_route :post, "/versions/1/status_by", :controller => 'versions', :action => 'status_by', :id => '1'
469 end
487 end
470
488
471 def test_welcome
489 def test_welcome
472 assert_routing(
490 assert_routing(
473 { :method => 'get', :path => "/robots.txt" },
491 { :method => 'get', :path => "/robots.txt" },
474 { :controller => 'welcome', :action => 'robots' }
492 { :controller => 'welcome', :action => 'robots' }
475 )
493 )
476 end
494 end
477
495
478 context "wiki (singular, project's pages)" do
496 context "wiki (singular, project's pages)" do
479 should_route :get, "/projects/567/wiki", :controller => 'wiki', :action => 'show', :project_id => '567'
497 should_route :get, "/projects/567/wiki", :controller => 'wiki', :action => 'show', :project_id => '567'
480 should_route :get, "/projects/567/wiki/lalala", :controller => 'wiki', :action => 'show', :project_id => '567', :id => 'lalala'
498 should_route :get, "/projects/567/wiki/lalala", :controller => 'wiki', :action => 'show', :project_id => '567', :id => 'lalala'
481 should_route :get, "/projects/567/wiki/my_page/edit", :controller => 'wiki', :action => 'edit', :project_id => '567', :id => 'my_page'
499 should_route :get, "/projects/567/wiki/my_page/edit", :controller => 'wiki', :action => 'edit', :project_id => '567', :id => 'my_page'
482 should_route :get, "/projects/1/wiki/CookBook_documentation/history", :controller => 'wiki', :action => 'history', :project_id => '1', :id => 'CookBook_documentation'
500 should_route :get, "/projects/1/wiki/CookBook_documentation/history", :controller => 'wiki', :action => 'history', :project_id => '1', :id => 'CookBook_documentation'
483 should_route :get, "/projects/1/wiki/CookBook_documentation/diff", :controller => 'wiki', :action => 'diff', :project_id => '1', :id => 'CookBook_documentation'
501 should_route :get, "/projects/1/wiki/CookBook_documentation/diff", :controller => 'wiki', :action => 'diff', :project_id => '1', :id => 'CookBook_documentation'
484 should_route :get, "/projects/1/wiki/CookBook_documentation/diff/2", :controller => 'wiki', :action => 'diff', :project_id => '1', :id => 'CookBook_documentation', :version => '2'
502 should_route :get, "/projects/1/wiki/CookBook_documentation/diff/2", :controller => 'wiki', :action => 'diff', :project_id => '1', :id => 'CookBook_documentation', :version => '2'
485 should_route :get, "/projects/1/wiki/CookBook_documentation/diff/2/vs/1", :controller => 'wiki', :action => 'diff', :project_id => '1', :id => 'CookBook_documentation', :version => '2', :version_from => '1'
503 should_route :get, "/projects/1/wiki/CookBook_documentation/diff/2/vs/1", :controller => 'wiki', :action => 'diff', :project_id => '1', :id => 'CookBook_documentation', :version => '2', :version_from => '1'
486 should_route :get, "/projects/1/wiki/CookBook_documentation/annotate/2", :controller => 'wiki', :action => 'annotate', :project_id => '1', :id => 'CookBook_documentation', :version => '2'
504 should_route :get, "/projects/1/wiki/CookBook_documentation/annotate/2", :controller => 'wiki', :action => 'annotate', :project_id => '1', :id => 'CookBook_documentation', :version => '2'
487 should_route :get, "/projects/22/wiki/ladida/rename", :controller => 'wiki', :action => 'rename', :project_id => '22', :id => 'ladida'
505 should_route :get, "/projects/22/wiki/ladida/rename", :controller => 'wiki', :action => 'rename', :project_id => '22', :id => 'ladida'
488 should_route :get, "/projects/567/wiki/index", :controller => 'wiki', :action => 'index', :project_id => '567'
506 should_route :get, "/projects/567/wiki/index", :controller => 'wiki', :action => 'index', :project_id => '567'
489 should_route :get, "/projects/567/wiki/date_index", :controller => 'wiki', :action => 'date_index', :project_id => '567'
507 should_route :get, "/projects/567/wiki/date_index", :controller => 'wiki', :action => 'date_index', :project_id => '567'
490 should_route :get, "/projects/567/wiki/export", :controller => 'wiki', :action => 'export', :project_id => '567'
508 should_route :get, "/projects/567/wiki/export", :controller => 'wiki', :action => 'export', :project_id => '567'
491
509
492 should_route :post, "/projects/567/wiki/CookBook_documentation/preview", :controller => 'wiki', :action => 'preview', :project_id => '567', :id => 'CookBook_documentation'
510 should_route :post, "/projects/567/wiki/CookBook_documentation/preview", :controller => 'wiki', :action => 'preview', :project_id => '567', :id => 'CookBook_documentation'
493 should_route :post, "/projects/22/wiki/ladida/rename", :controller => 'wiki', :action => 'rename', :project_id => '22', :id => 'ladida'
511 should_route :post, "/projects/22/wiki/ladida/rename", :controller => 'wiki', :action => 'rename', :project_id => '22', :id => 'ladida'
494 should_route :post, "/projects/22/wiki/ladida/protect", :controller => 'wiki', :action => 'protect', :project_id => '22', :id => 'ladida'
512 should_route :post, "/projects/22/wiki/ladida/protect", :controller => 'wiki', :action => 'protect', :project_id => '22', :id => 'ladida'
495 should_route :post, "/projects/22/wiki/ladida/add_attachment", :controller => 'wiki', :action => 'add_attachment', :project_id => '22', :id => 'ladida'
513 should_route :post, "/projects/22/wiki/ladida/add_attachment", :controller => 'wiki', :action => 'add_attachment', :project_id => '22', :id => 'ladida'
496
514
497 should_route :put, "/projects/567/wiki/my_page", :controller => 'wiki', :action => 'update', :project_id => '567', :id => 'my_page'
515 should_route :put, "/projects/567/wiki/my_page", :controller => 'wiki', :action => 'update', :project_id => '567', :id => 'my_page'
498
516
499 should_route :delete, "/projects/22/wiki/ladida", :controller => 'wiki', :action => 'destroy', :project_id => '22', :id => 'ladida'
517 should_route :delete, "/projects/22/wiki/ladida", :controller => 'wiki', :action => 'destroy', :project_id => '22', :id => 'ladida'
500 end
518 end
501
519
502 context "wikis (plural, admin setup)" do
520 context "wikis (plural, admin setup)" do
503 should_route :get, "/projects/ladida/wiki/destroy", :controller => 'wikis', :action => 'destroy', :id => 'ladida'
521 should_route :get, "/projects/ladida/wiki/destroy", :controller => 'wikis', :action => 'destroy', :id => 'ladida'
504
522
505 should_route :post, "/projects/ladida/wiki", :controller => 'wikis', :action => 'edit', :id => 'ladida'
523 should_route :post, "/projects/ladida/wiki", :controller => 'wikis', :action => 'edit', :id => 'ladida'
506 should_route :post, "/projects/ladida/wiki/destroy", :controller => 'wikis', :action => 'destroy', :id => 'ladida'
524 should_route :post, "/projects/ladida/wiki/destroy", :controller => 'wikis', :action => 'destroy', :id => 'ladida'
507 end
525 end
508
526
509 def test_administration_panel
527 def test_administration_panel
510 assert_routing(
528 assert_routing(
511 { :method => 'get', :path => "/admin/projects" },
529 { :method => 'get', :path => "/admin/projects" },
512 { :controller => 'admin', :action => 'projects' }
530 { :controller => 'admin', :action => 'projects' }
513 )
531 )
514 end
532 end
515 end
533 end
General Comments 0
You need to be logged in to leave comments. Login now