From 3ae98e0b8d7db0bee562192dccd884f218087f0d Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sun, 25 Dec 2011 12:35:22 +0000 Subject: [PATCH] test: route: simplify account tests git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8365 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/integration/routing/account_test.rb | 42 ++++++++++-------------- 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/test/integration/routing/account_test.rb b/test/integration/routing/account_test.rb index f524099f0..c9b9cd60d 100644 --- a/test/integration/routing/account_test.rb +++ b/test/integration/routing/account_test.rb @@ -19,34 +19,28 @@ require File.expand_path('../../../test_helper', __FILE__) class RoutingAccountTest < ActionController::IntegrationTest def test_account - assert_routing( - { :method => 'get', :path => "/login" }, - { :controller => 'account', :action => 'login' } - ) - assert_routing( - { :method => 'post', :path => "/login" }, - { :controller => 'account', :action => 'login' } - ) + ["get", "post"].each do |method| + assert_routing( + { :method => method, :path => "/login" }, + { :controller => 'account', :action => 'login' } + ) + end assert_routing( { :method => 'get', :path => "/logout" }, { :controller => 'account', :action => 'logout' } ) - assert_routing( - { :method => 'get', :path => "/account/register" }, - { :controller => 'account', :action => 'register' } - ) - assert_routing( - { :method => 'post', :path => "/account/register" }, - { :controller => 'account', :action => 'register' } - ) - assert_routing( - { :method => 'get', :path => "/account/lost_password" }, - { :controller => 'account', :action => 'lost_password' } - ) - assert_routing( - { :method => 'post', :path => "/account/lost_password" }, - { :controller => 'account', :action => 'lost_password' } - ) + ["get", "post"].each do |method| + assert_routing( + { :method => method, :path => "/account/register" }, + { :controller => 'account', :action => 'register' } + ) + end + ["get", "post"].each do |method| + assert_routing( + { :method => method, :path => "/account/lost_password" }, + { :controller => 'account', :action => 'lost_password' } + ) + end assert_routing( { :method => 'get', :path => "/account/activate" }, { :controller => 'account', :action => 'activate' } -- 2.39.5