summaryrefslogtreecommitdiffstats
path: root/test/integration/routing/boards_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/boards_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/boards_test.rb')
-rw-r--r--test/integration/routing/boards_test.rb48
1 files changed, 10 insertions, 38 deletions
diff --git a/test/integration/routing/boards_test.rb b/test/integration/routing/boards_test.rb
index 6551181c5..2d91fd895 100644
--- a/test/integration/routing/boards_test.rb
+++ b/test/integration/routing/boards_test.rb
@@ -17,44 +17,16 @@
require File.expand_path('../../../test_helper', __FILE__)
-class RoutingBoardsTest < ActionDispatch::IntegrationTest
+class RoutingBoardsTest < Redmine::RoutingTest
def test_boards
- assert_routing(
- { :method => 'get', :path => "/projects/world_domination/boards" },
- { :controller => 'boards', :action => 'index', :project_id => 'world_domination' }
- )
- assert_routing(
- { :method => 'get', :path => "/projects/world_domination/boards/new" },
- { :controller => 'boards', :action => 'new', :project_id => 'world_domination' }
- )
- assert_routing(
- { :method => 'get', :path => "/projects/world_domination/boards/44" },
- { :controller => 'boards', :action => 'show', :project_id => 'world_domination',
- :id => '44' }
- )
- assert_routing(
- { :method => 'get', :path => "/projects/world_domination/boards/44.atom" },
- { :controller => 'boards', :action => 'show', :project_id => 'world_domination',
- :id => '44', :format => 'atom' }
- )
- assert_routing(
- { :method => 'get', :path => "/projects/world_domination/boards/44/edit" },
- { :controller => 'boards', :action => 'edit', :project_id => 'world_domination',
- :id => '44' }
- )
- assert_routing(
- { :method => 'post', :path => "/projects/world_domination/boards" },
- { :controller => 'boards', :action => 'create', :project_id => 'world_domination' }
- )
- assert_routing(
- { :method => 'put', :path => "/projects/world_domination/boards/44" },
- { :controller => 'boards', :action => 'update', :project_id => 'world_domination',
- :id => '44' }
- )
- assert_routing(
- { :method => 'delete', :path => "/projects/world_domination/boards/44" },
- { :controller => 'boards', :action => 'destroy', :project_id => 'world_domination',
- :id => '44' }
- )
+ should_route 'GET /projects/foo/boards' => 'boards#index', :project_id => 'foo'
+ should_route 'GET /projects/foo/boards/new' => 'boards#new', :project_id => 'foo'
+ should_route 'POST /projects/foo/boards' => 'boards#create', :project_id => 'foo'
+
+ should_route 'GET /projects/foo/boards/44' => 'boards#show', :project_id => 'foo', :id => '44'
+ should_route 'GET /projects/foo/boards/44.atom' => 'boards#show', :project_id => 'foo', :id => '44', :format => 'atom'
+ should_route 'GET /projects/foo/boards/44/edit' => 'boards#edit', :project_id => 'foo', :id => '44'
+ should_route 'PUT /projects/foo/boards/44' => 'boards#update', :project_id => 'foo', :id => '44'
+ should_route 'DELETE /projects/foo/boards/44' => 'boards#destroy', :project_id => 'foo', :id => '44'
end
end