comparison vendor/plugins/engines/test/functional/.svn/text-base/routes_test.rb.svn-base @ 0:513646585e45

* Import Redmine trunk SVN rev 3859
author Chris Cannam
date Fri, 23 Jul 2010 15:52:44 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:513646585e45
1 # Tests in this file ensure that:
2 #
3 # * Routes from plugins can be routed to
4 # * Named routes can be defined within a plugin
5
6 require File.dirname(__FILE__) + '/../test_helper'
7
8 class RoutesTest < ActionController::TestCase
9 tests TestRoutingController
10
11 def test_WITH_a_route_defined_in_a_plugin_IT_should_route_it
12 path = '/routes/an_action'
13 opts = {:controller => 'test_routing', :action => 'an_action'}
14 assert_routing path, opts
15 assert_recognizes opts, path # not sure what exactly the difference is, but it won't hurt either
16 end
17
18 def test_WITH_a_route_for_a_namespaced_controller_defined_in_a_plugin_IT_should_route_it
19 path = 'somespace/routes/an_action'
20 opts = {:controller => 'namespace/test_routing', :action => 'an_action'}
21 assert_routing path, opts
22 assert_recognizes opts, path
23 end
24
25 def test_should_properly_generate_named_routes
26 get :test_named_routes_from_plugin
27 assert_response_body '/somespace/routes'
28 end
29 end