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