diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-11-16 14:23:32 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-11-16 14:23:32 +0000 |
commit | ecda1c7a4f30354db74e73eade71550074f67356 (patch) | |
tree | 6f57fba84094ff87a171b05ef3f365bbca69120c /test/integration/routing/members_test.rb | |
parent | d72e1f95ba4f5c354fbb701808c20c99266077fd (diff) | |
download | redmine-ecda1c7a4f30354db74e73eade71550074f67356.tar.gz redmine-ecda1c7a4f30354db74e73eade71550074f67356.zip |
Use should_route in routing tests.
git-svn-id: http://svn.redmine.org/redmine/trunk@13608 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration/routing/members_test.rb')
-rw-r--r-- | test/integration/routing/members_test.rb | 34 |
1 files changed, 9 insertions, 25 deletions
diff --git a/test/integration/routing/members_test.rb b/test/integration/routing/members_test.rb index cb70bd632..f87479013 100644 --- a/test/integration/routing/members_test.rb +++ b/test/integration/routing/members_test.rb @@ -17,31 +17,15 @@ require File.expand_path('../../../test_helper', __FILE__) -class RoutingMembersTest < ActionDispatch::IntegrationTest +class RoutingMembersTest < Redmine::RoutingTest def test_members - assert_routing( - { :method => 'post', :path => "/projects/5234/memberships" }, - { :controller => 'members', :action => 'create', :project_id => '5234' } - ) - assert_routing( - { :method => 'get', :path => "/projects/5234/memberships/new" }, - { :controller => 'members', :action => 'new', :project_id => '5234' } - ) - assert_routing( - { :method => 'put', :path => "/memberships/5234" }, - { :controller => 'members', :action => 'update', :id => '5234' } - ) - assert_routing( - { :method => 'delete', :path => "/memberships/5234" }, - { :controller => 'members', :action => 'destroy', :id => '5234' } - ) - assert_routing( - { :method => 'get', :path => "/projects/5234/memberships/autocomplete" }, - { :controller => 'members', :action => 'autocomplete', :project_id => '5234' } - ) - assert_routing( - { :method => 'get', :path => "/projects/5234/memberships/autocomplete.js" }, - { :controller => 'members', :action => 'autocomplete', :project_id => '5234', :format => 'js' } - ) + should_route 'GET /projects/foo/memberships/new' => 'members#new', :project_id => 'foo' + should_route 'POST /projects/foo/memberships' => 'members#create', :project_id => 'foo' + + should_route 'PUT /memberships/5234' => 'members#update', :id => '5234' + should_route 'DELETE /memberships/5234' => 'members#destroy', :id => '5234' + + should_route 'GET /projects/foo/memberships/autocomplete' => 'members#autocomplete', :project_id => 'foo' + should_route 'GET /projects/foo/memberships/autocomplete.js' => 'members#autocomplete', :project_id => 'foo', :format => 'js' end end |