test: route: simplify "my" tests
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8366 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
3ae98e0b8d
commit
27dee8eff4
|
@ -19,14 +19,12 @@ require File.expand_path('../../../test_helper', __FILE__)
|
||||||
|
|
||||||
class RoutingMyTest < ActionController::IntegrationTest
|
class RoutingMyTest < ActionController::IntegrationTest
|
||||||
def test_my
|
def test_my
|
||||||
assert_routing(
|
["get", "post"].each do |method|
|
||||||
{ :method => 'get', :path => "/my/account" },
|
assert_routing(
|
||||||
{ :controller => 'my', :action => 'account' }
|
{ :method => method, :path => "/my/account" },
|
||||||
)
|
{ :controller => 'my', :action => 'account' }
|
||||||
assert_routing(
|
)
|
||||||
{ :method => 'post', :path => "/my/account" },
|
end
|
||||||
{ :controller => 'my', :action => 'account' }
|
|
||||||
)
|
|
||||||
assert_routing(
|
assert_routing(
|
||||||
{ :method => 'get', :path => "/my/page" },
|
{ :method => 'get', :path => "/my/page" },
|
||||||
{ :controller => 'my', :action => 'page' }
|
{ :controller => 'my', :action => 'page' }
|
||||||
|
@ -43,14 +41,12 @@ class RoutingMyTest < ActionController::IntegrationTest
|
||||||
{ :method => 'post', :path => "/my/reset_api_key" },
|
{ :method => 'post', :path => "/my/reset_api_key" },
|
||||||
{ :controller => 'my', :action => 'reset_api_key' }
|
{ :controller => 'my', :action => 'reset_api_key' }
|
||||||
)
|
)
|
||||||
assert_routing(
|
["get", "post"].each do |method|
|
||||||
{ :method => 'get', :path => "/my/password" },
|
assert_routing(
|
||||||
{ :controller => 'my', :action => 'password' }
|
{ :method => method, :path => "/my/password" },
|
||||||
)
|
{ :controller => 'my', :action => 'password' }
|
||||||
assert_routing(
|
)
|
||||||
{ :method => 'post', :path => "/my/password" },
|
end
|
||||||
{ :controller => 'my', :action => 'password' }
|
|
||||||
)
|
|
||||||
assert_routing(
|
assert_routing(
|
||||||
{ :method => 'get', :path => "/my/page_layout" },
|
{ :method => 'get', :path => "/my/page_layout" },
|
||||||
{ :controller => 'my', :action => 'page_layout' }
|
{ :controller => 'my', :action => 'page_layout' }
|
||||||
|
|
Loading…
Reference in New Issue