summaryrefslogtreecommitdiffstats
path: root/test/integration/routing/previews_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/previews_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/previews_test.rb')
-rw-r--r--test/integration/routing/previews_test.rb25
1 files changed, 10 insertions, 15 deletions
diff --git a/test/integration/routing/previews_test.rb b/test/integration/routing/previews_test.rb
index fcdcfe5bd..91315fe2d 100644
--- a/test/integration/routing/previews_test.rb
+++ b/test/integration/routing/previews_test.rb
@@ -17,21 +17,16 @@
require File.expand_path('../../../test_helper', __FILE__)
-class RoutingPreviewsTest < ActionDispatch::IntegrationTest
+class RoutingPreviewsTest < Redmine::RoutingTest
def test_previews
- ["get", "post", "put"].each do |method|
- assert_routing(
- { :method => method, :path => "/issues/preview/new/123" },
- { :controller => 'previews', :action => 'issue', :project_id => '123' }
- )
- assert_routing(
- { :method => method, :path => "/issues/preview/edit/321" },
- { :controller => 'previews', :action => 'issue', :id => '321' }
- )
- end
- assert_routing(
- { :method => 'get', :path => "/news/preview" },
- { :controller => 'previews', :action => 'news' }
- )
+ should_route 'GET /issues/preview/new/foo' => 'previews#issue', :project_id => 'foo'
+ should_route 'PUT /issues/preview/new/foo' => 'previews#issue', :project_id => 'foo'
+ should_route 'POST /issues/preview/new/foo' => 'previews#issue', :project_id => 'foo'
+
+ should_route 'GET /issues/preview/edit/321' => 'previews#issue', :id => '321'
+ should_route 'PUT /issues/preview/edit/321' => 'previews#issue', :id => '321'
+ should_route 'POST /issues/preview/edit/321' => 'previews#issue', :id => '321'
+
+ should_route 'GET /news/preview' => 'previews#news'
end
end