diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-12-14 10:07:31 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-12-14 10:07:31 +0000 |
commit | a61d7d053ff3fd65c954820986c416433878ac1e (patch) | |
tree | c355d6974441d599d7cf0af206611aca9e1d1631 | |
parent | 0b4aed008c9650e5f4d7290fe6a243b4f3b1eb1d (diff) | |
download | redmine-a61d7d053ff3fd65c954820986c416433878ac1e.tar.gz redmine-a61d7d053ff3fd65c954820986c416433878ac1e.zip |
test: replace "should_route" of "attachments" to "assert_routing" at integration/routing_test.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8202 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | test/integration/routing_test.rb | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/test/integration/routing_test.rb b/test/integration/routing_test.rb index a8fc2cdab..536cec89e 100644 --- a/test/integration/routing_test.rb +++ b/test/integration/routing_test.rb @@ -29,13 +29,33 @@ class RoutingTest < ActionController::IntegrationTest ) end - context "attachments" do - should_route :get, "/attachments/1", :controller => 'attachments', :action => 'show', :id => '1' - should_route :get, "/attachments/1.xml", :controller => 'attachments', :action => 'show', :id => '1', :format => 'xml' - should_route :get, "/attachments/1.json", :controller => 'attachments', :action => 'show', :id => '1', :format => 'json' - should_route :get, "/attachments/1/filename.ext", :controller => 'attachments', :action => 'show', :id => '1', :filename => 'filename.ext' - should_route :get, "/attachments/download/1", :controller => 'attachments', :action => 'download', :id => '1' - should_route :get, "/attachments/download/1/filename.ext", :controller => 'attachments', :action => 'download', :id => '1', :filename => 'filename.ext' + def test_attachments + assert_routing( + { :method => 'get', :path => "/attachments/1" }, + { :controller => 'attachments', :action => 'show', :id => '1' } + ) + assert_routing( + { :method => 'get', :path => "/attachments/1.xml" }, + { :controller => 'attachments', :action => 'show', :id => '1', :format => 'xml' } + ) + assert_routing( + { :method => 'get', :path => "/attachments/1.json" }, + { :controller => 'attachments', :action => 'show', :id => '1', :format => 'json' } + ) + assert_routing( + { :method => 'get', :path => "/attachments/1/filename.ext" }, + { :controller => 'attachments', :action => 'show', :id => '1', + :filename => 'filename.ext' } + ) + assert_routing( + { :method => 'get', :path => "/attachments/download/1" }, + { :controller => 'attachments', :action => 'download', :id => '1' } + ) + assert_routing( + { :method => 'get', :path => "/attachments/download/1/filename.ext" }, + { :controller => 'attachments', :action => 'download', :id => '1', + :filename => 'filename.ext' } + ) end context "boards" do |