@@ -1,71 +1,67 | |||
|
1 | 1 | # Redmine - project management software |
|
2 | 2 | # Copyright (C) 2006-2011 Jean-Philippe Lang |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | 18 | require File.expand_path('../../../test_helper', __FILE__) |
|
19 | 19 | |
|
20 | 20 | class RoutingMyTest < ActionController::IntegrationTest |
|
21 | 21 | def test_my |
|
22 | assert_routing( | |
|
23 | { :method => 'get', :path => "/my/account" }, | |
|
24 |
{ : |
|
|
25 | ) | |
|
26 | assert_routing( | |
|
27 | { :method => 'post', :path => "/my/account" }, | |
|
28 | { :controller => 'my', :action => 'account' } | |
|
29 | ) | |
|
22 | ["get", "post"].each do |method| | |
|
23 | assert_routing( | |
|
24 | { :method => method, :path => "/my/account" }, | |
|
25 | { :controller => 'my', :action => 'account' } | |
|
26 | ) | |
|
27 | end | |
|
30 | 28 | assert_routing( |
|
31 | 29 | { :method => 'get', :path => "/my/page" }, |
|
32 | 30 | { :controller => 'my', :action => 'page' } |
|
33 | 31 | ) |
|
34 | 32 | assert_routing( |
|
35 | 33 | { :method => 'get', :path => "/my" }, |
|
36 | 34 | { :controller => 'my', :action => 'index' } |
|
37 | 35 | ) |
|
38 | 36 | assert_routing( |
|
39 | 37 | { :method => 'post', :path => "/my/reset_rss_key" }, |
|
40 | 38 | { :controller => 'my', :action => 'reset_rss_key' } |
|
41 | 39 | ) |
|
42 | 40 | assert_routing( |
|
43 | 41 | { :method => 'post', :path => "/my/reset_api_key" }, |
|
44 | 42 | { :controller => 'my', :action => 'reset_api_key' } |
|
45 | 43 | ) |
|
46 | assert_routing( | |
|
47 | { :method => 'get', :path => "/my/password" }, | |
|
48 |
{ : |
|
|
49 | ) | |
|
50 | assert_routing( | |
|
51 | { :method => 'post', :path => "/my/password" }, | |
|
52 | { :controller => 'my', :action => 'password' } | |
|
53 | ) | |
|
44 | ["get", "post"].each do |method| | |
|
45 | assert_routing( | |
|
46 | { :method => method, :path => "/my/password" }, | |
|
47 | { :controller => 'my', :action => 'password' } | |
|
48 | ) | |
|
49 | end | |
|
54 | 50 | assert_routing( |
|
55 | 51 | { :method => 'get', :path => "/my/page_layout" }, |
|
56 | 52 | { :controller => 'my', :action => 'page_layout' } |
|
57 | 53 | ) |
|
58 | 54 | assert_routing( |
|
59 | 55 | { :method => 'post', :path => "/my/add_block" }, |
|
60 | 56 | { :controller => 'my', :action => 'add_block' } |
|
61 | 57 | ) |
|
62 | 58 | assert_routing( |
|
63 | 59 | { :method => 'post', :path => "/my/remove_block" }, |
|
64 | 60 | { :controller => 'my', :action => 'remove_block' } |
|
65 | 61 | ) |
|
66 | 62 | assert_routing( |
|
67 | 63 | { :method => 'post', :path => "/my/order_blocks" }, |
|
68 | 64 | { :controller => 'my', :action => 'order_blocks' } |
|
69 | 65 | ) |
|
70 | 66 | end |
|
71 | 67 | end |
General Comments 0
You need to be logged in to leave comments.
Login now