##// END OF EJS Templates
test: route: simplify "my" tests...
Toshi MARUYAMA -
r8246:27dee8eff450
parent child
Show More
@@ -19,14 +19,12 require File.expand_path('../../../test_helper', __FILE__)
19
19
20 class RoutingMyTest < ActionController::IntegrationTest
20 class RoutingMyTest < ActionController::IntegrationTest
21 def test_my
21 def test_my
22 assert_routing(
22 ["get", "post"].each do |method|
23 { :method => 'get', :path => "/my/account" },
23 assert_routing(
24 { :controller => 'my', :action => 'account' }
24 { :method => method, :path => "/my/account" },
25 )
25 { :controller => 'my', :action => 'account' }
26 assert_routing(
26 )
27 { :method => 'post', :path => "/my/account" },
27 end
28 { :controller => 'my', :action => 'account' }
29 )
30 assert_routing(
28 assert_routing(
31 { :method => 'get', :path => "/my/page" },
29 { :method => 'get', :path => "/my/page" },
32 { :controller => 'my', :action => 'page' }
30 { :controller => 'my', :action => 'page' }
@@ -43,14 +41,12 class RoutingMyTest < ActionController::IntegrationTest
43 { :method => 'post', :path => "/my/reset_api_key" },
41 { :method => 'post', :path => "/my/reset_api_key" },
44 { :controller => 'my', :action => 'reset_api_key' }
42 { :controller => 'my', :action => 'reset_api_key' }
45 )
43 )
46 assert_routing(
44 ["get", "post"].each do |method|
47 { :method => 'get', :path => "/my/password" },
45 assert_routing(
48 { :controller => 'my', :action => 'password' }
46 { :method => method, :path => "/my/password" },
49 )
47 { :controller => 'my', :action => 'password' }
50 assert_routing(
48 )
51 { :method => 'post', :path => "/my/password" },
49 end
52 { :controller => 'my', :action => 'password' }
53 )
54 assert_routing(
50 assert_routing(
55 { :method => 'get', :path => "/my/page_layout" },
51 { :method => 'get', :path => "/my/page_layout" },
56 { :controller => 'my', :action => 'page_layout' }
52 { :controller => 'my', :action => 'page_layout' }
General Comments 0
You need to be logged in to leave comments. Login now