Refactor: Move the rest of the routing tests to RoutingTest.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3687 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -34,21 +34,6 @@ class AttachmentsControllerTest < ActionController::TestCase
|
||||
User.current = nil
|
||||
end
|
||||
|
||||
def test_routing
|
||||
assert_routing('/attachments/1', :controller => 'attachments', :action => 'show', :id => '1')
|
||||
assert_routing('/attachments/1/filename.ext', :controller => 'attachments', :action => 'show', :id => '1', :filename => 'filename.ext')
|
||||
assert_routing('/attachments/download/1', :controller => 'attachments', :action => 'download', :id => '1')
|
||||
assert_routing('/attachments/download/1/filename.ext', :controller => 'attachments', :action => 'download', :id => '1', :filename => 'filename.ext')
|
||||
end
|
||||
|
||||
def test_recognizes
|
||||
assert_recognizes({:controller => 'attachments', :action => 'show', :id => '1'}, '/attachments/1')
|
||||
assert_recognizes({:controller => 'attachments', :action => 'show', :id => '1'}, '/attachments/show/1')
|
||||
assert_recognizes({:controller => 'attachments', :action => 'show', :id => '1', :filename => 'filename.ext'}, '/attachments/1/filename.ext')
|
||||
assert_recognizes({:controller => 'attachments', :action => 'download', :id => '1'}, '/attachments/download/1')
|
||||
assert_recognizes({:controller => 'attachments', :action => 'download', :id => '1', :filename => 'filename.ext'},'/attachments/download/1/filename.ext')
|
||||
end
|
||||
|
||||
def test_show_diff
|
||||
get :show, :id => 5
|
||||
assert_response :success
|
||||
|
||||
Reference in New Issue
Block a user