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