From 431e98c999d77d473498459ecc453b0c8d1a97e1 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Mon, 26 Dec 2011 05:53:49 +0000 Subject: [PATCH] test: route: simplify previews tests git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8370 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/integration/routing/previews_test.rb | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/test/integration/routing/previews_test.rb b/test/integration/routing/previews_test.rb index 58bcc4ae0..52799253d 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' } -- 2.39.5