mirror of
https://github.com/redmine/redmine.git
synced 2025-11-09 14:56:01 +01:00
Use should_route in routing tests.
git-svn-id: http://svn.redmine.org/redmine/trunk@13608 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -17,16 +17,9 @@
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingCommentsTest < ActionDispatch::IntegrationTest
|
||||
class RoutingCommentsTest < Redmine::RoutingTest
|
||||
def test_comments
|
||||
assert_routing(
|
||||
{ :method => 'post', :path => "/news/567/comments" },
|
||||
{ :controller => 'comments', :action => 'create', :id => '567' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'delete', :path => "/news/567/comments/15" },
|
||||
{ :controller => 'comments', :action => 'destroy', :id => '567',
|
||||
:comment_id => '15' }
|
||||
)
|
||||
should_route 'POST /news/567/comments' => 'comments#create', :id => '567'
|
||||
should_route 'DELETE /news/567/comments/15' => 'comments#destroy', :id => '567', :comment_id => '15'
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user