From 431e98c999d77d473498459ecc453b0c8d1a97e1 2011-12-26 05:53:49 From: Toshi MARUYAMA Date: 2011-12-26 05:53:49 Subject: [PATCH] test: route: simplify previews tests git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8370 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/test/integration/routing/previews_test.rb b/test/integration/routing/previews_test.rb index 58bcc4a..5279925 100644 --- a/test/integration/routing/previews_test.rb +++ b/test/integration/routing/previews_test.rb @@ -19,14 +19,12 @@ require File.expand_path('../../../test_helper', __FILE__) class RoutingPreviewsTest < ActionController::IntegrationTest def test_previews - assert_routing( - { :method => 'get', :path => "/issues/preview/123" }, - { :controller => 'previews', :action => 'issue', :id => '123' } - ) - assert_routing( - { :method => 'post', :path => "/issues/preview/123" }, - { :controller => 'previews', :action => 'issue', :id => '123' } - ) + ["get", "post"].each do |method| + assert_routing( + { :method => method, :path => "/issues/preview/123" }, + { :controller => 'previews', :action => 'issue', :id => '123' } + ) + end assert_routing( { :method => 'get', :path => "/news/preview" }, { :controller => 'previews', :action => 'news' }