mirror of
https://github.com/redmine/redmine.git
synced 2025-11-12 00:06: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,24 +17,15 @@
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingActivitiesTest < ActionDispatch::IntegrationTest
|
||||
def test_activities
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/activity" },
|
||||
{ :controller => 'activities', :action => 'index' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/activity.atom" },
|
||||
{ :controller => 'activities', :action => 'index', :format => 'atom' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/projects/33/activity" },
|
||||
{ :controller => 'activities', :action => 'index', :id => '33' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/projects/33/activity.atom" },
|
||||
{ :controller => 'activities', :action => 'index', :id => '33',
|
||||
:format => 'atom' }
|
||||
)
|
||||
class RoutingActivitiesTest < Redmine::RoutingTest
|
||||
|
||||
def test_activity
|
||||
should_route 'GET /activity' => 'activities#index'
|
||||
should_route 'GET /activity.atom' => 'activities#index', :format => 'atom'
|
||||
end
|
||||
|
||||
def test_project_activity
|
||||
should_route 'GET /projects/33/activity' => 'activities#index', :id => '33'
|
||||
should_route 'GET /projects/33/activity.atom' => 'activities#index', :id => '33', :format => 'atom'
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user