test: route: simplify previews tests

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8370 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-12-26 05:53:49 +00:00
parent ecd2b75ba4
commit 431e98c999
1 changed files with 6 additions and 8 deletions

View File

@ -19,14 +19,12 @@ require File.expand_path('../../../test_helper', __FILE__)
class RoutingPreviewsTest < ActionController::IntegrationTest class RoutingPreviewsTest < ActionController::IntegrationTest
def test_previews def test_previews
assert_routing( ["get", "post"].each do |method|
{ :method => 'get', :path => "/issues/preview/123" }, assert_routing(
{ :controller => 'previews', :action => 'issue', :id => '123' } { :method => method, :path => "/issues/preview/123" },
) { :controller => 'previews', :action => 'issue', :id => '123' }
assert_routing( )
{ :method => 'post', :path => "/issues/preview/123" }, end
{ :controller => 'previews', :action => 'issue', :id => '123' }
)
assert_routing( assert_routing(
{ :method => 'get', :path => "/news/preview" }, { :method => 'get', :path => "/news/preview" },
{ :controller => 'previews', :action => 'news' } { :controller => 'previews', :action => 'news' }