summaryrefslogtreecommitdiffstats
path: root/test/integration
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-12-25 12:48:29 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-12-25 12:48:29 +0000
commit27dee8eff4505e1daf6c88958c5b918eaaa6f9f2 (patch)
tree6388fdf01f89c2170289bf4cb5e5a0f55bef730b /test/integration
parent3ae98e0b8d7db0bee562192dccd884f218087f0d (diff)
downloadredmine-27dee8eff4505e1daf6c88958c5b918eaaa6f9f2.tar.gz
redmine-27dee8eff4505e1daf6c88958c5b918eaaa6f9f2.zip
test: route: simplify "my" tests
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8366 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/routing/my_test.rb28
1 files changed, 12 insertions, 16 deletions
diff --git a/test/integration/routing/my_test.rb b/test/integration/routing/my_test.rb
index b67677a7b..5537a8b72 100644
--- a/test/integration/routing/my_test.rb
+++ b/test/integration/routing/my_test.rb
@@ -19,14 +19,12 @@ require File.expand_path('../../../test_helper', __FILE__)
class RoutingMyTest < ActionController::IntegrationTest
def test_my
- assert_routing(
- { :method => 'get', :path => "/my/account" },
- { :controller => 'my', :action => 'account' }
- )
- assert_routing(
- { :method => 'post', :path => "/my/account" },
- { :controller => 'my', :action => 'account' }
- )
+ ["get", "post"].each do |method|
+ assert_routing(
+ { :method => method, :path => "/my/account" },
+ { :controller => 'my', :action => 'account' }
+ )
+ end
assert_routing(
{ :method => 'get', :path => "/my/page" },
{ :controller => 'my', :action => 'page' }
@@ -43,14 +41,12 @@ class RoutingMyTest < ActionController::IntegrationTest
{ :method => 'post', :path => "/my/reset_api_key" },
{ :controller => 'my', :action => 'reset_api_key' }
)
- assert_routing(
- { :method => 'get', :path => "/my/password" },
- { :controller => 'my', :action => 'password' }
- )
- assert_routing(
- { :method => 'post', :path => "/my/password" },
- { :controller => 'my', :action => 'password' }
- )
+ ["get", "post"].each do |method|
+ assert_routing(
+ { :method => method, :path => "/my/password" },
+ { :controller => 'my', :action => 'password' }
+ )
+ end
assert_routing(
{ :method => 'get', :path => "/my/page_layout" },
{ :controller => 'my', :action => 'page_layout' }