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