summaryrefslogtreecommitdiffstats
path: root/test/integration/routing/queries_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/queries_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/queries_test.rb')
-rw-r--r--test/integration/routing/queries_test.rb38
1 files changed, 9 insertions, 29 deletions
diff --git a/test/integration/routing/queries_test.rb b/test/integration/routing/queries_test.rb
index 226a5b50c..904e20b92 100644
--- a/test/integration/routing/queries_test.rb
+++ b/test/integration/routing/queries_test.rb
@@ -17,38 +17,18 @@
require File.expand_path('../../../test_helper', __FILE__)
-class RoutingQueriesTest < ActionDispatch::IntegrationTest
+class RoutingQueriesTest < Redmine::RoutingTest
def test_queries
- assert_routing(
- { :method => 'get', :path => "/queries/new" },
- { :controller => 'queries', :action => 'new' }
- )
- assert_routing(
- { :method => 'post', :path => "/queries" },
- { :controller => 'queries', :action => 'create' }
- )
- assert_routing(
- { :method => 'get', :path => "/queries/1/edit" },
- { :controller => 'queries', :action => 'edit', :id => '1' }
- )
- assert_routing(
- { :method => 'put', :path => "/queries/1" },
- { :controller => 'queries', :action => 'update', :id => '1' }
- )
- assert_routing(
- { :method => 'delete', :path => "/queries/1" },
- { :controller => 'queries', :action => 'destroy', :id => '1' }
- )
+ should_route 'GET /queries/new' => 'queries#new'
+ should_route 'POST /queries' => 'queries#create'
+
+ should_route 'GET /queries/1/edit' => 'queries#edit', :id => '1'
+ should_route 'PUT /queries/1' => 'queries#update', :id => '1'
+ should_route 'DELETE /queries/1' => 'queries#destroy', :id => '1'
end
def test_queries_scoped_under_project
- assert_routing(
- { :method => 'get', :path => "/projects/redmine/queries/new" },
- { :controller => 'queries', :action => 'new', :project_id => 'redmine' }
- )
- assert_routing(
- { :method => 'post', :path => "/projects/redmine/queries" },
- { :controller => 'queries', :action => 'create', :project_id => 'redmine' }
- )
+ should_route 'GET /projects/foo/queries/new' => 'queries#new', :project_id => 'foo'
+ should_route 'POST /projects/foo/queries' => 'queries#create', :project_id => 'foo'
end
end