summaryrefslogtreecommitdiffstats
path: root/test/integration/routing/enumerations_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-11-16 14:23:32 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-11-16 14:23:32 +0000
commitecda1c7a4f30354db74e73eade71550074f67356 (patch)
tree6f57fba84094ff87a171b05ef3f365bbca69120c /test/integration/routing/enumerations_test.rb
parentd72e1f95ba4f5c354fbb701808c20c99266077fd (diff)
downloadredmine-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/enumerations_test.rb')
-rw-r--r--test/integration/routing/enumerations_test.rb33
1 files changed, 8 insertions, 25 deletions
diff --git a/test/integration/routing/enumerations_test.rb b/test/integration/routing/enumerations_test.rb
index 8bc88db43..770200d0d 100644
--- a/test/integration/routing/enumerations_test.rb
+++ b/test/integration/routing/enumerations_test.rb
@@ -17,31 +17,14 @@
require File.expand_path('../../../test_helper', __FILE__)
-class RoutingEnumerationsTest < ActionDispatch::IntegrationTest
+class RoutingEnumerationsTest < Redmine::RoutingTest
def test_enumerations
- assert_routing(
- { :method => 'get', :path => "/enumerations" },
- { :controller => 'enumerations', :action => 'index' }
- )
- assert_routing(
- { :method => 'get', :path => "/enumerations/new" },
- { :controller => 'enumerations', :action => 'new' }
- )
- assert_routing(
- { :method => 'post', :path => "/enumerations" },
- { :controller => 'enumerations', :action => 'create' }
- )
- assert_routing(
- { :method => 'get', :path => "/enumerations/2/edit" },
- { :controller => 'enumerations', :action => 'edit', :id => '2' }
- )
- assert_routing(
- { :method => 'put', :path => "/enumerations/2" },
- { :controller => 'enumerations', :action => 'update', :id => '2' }
- )
- assert_routing(
- { :method => 'delete', :path => "/enumerations/2" },
- { :controller => 'enumerations', :action => 'destroy', :id => '2' }
- )
+ should_route 'GET /enumerations' => 'enumerations#index'
+ should_route 'GET /enumerations/new' => 'enumerations#new'
+ should_route 'POST /enumerations' => 'enumerations#create'
+
+ should_route 'GET /enumerations/2/edit' => 'enumerations#edit', :id => '2'
+ should_route 'PUT /enumerations/2' => 'enumerations#update', :id => '2'
+ should_route 'DELETE /enumerations/2' => 'enumerations#destroy', :id => '2'
end
end