annotate .svn/pristine/d1/d1f808fff3001eb66af368407709979594e75713.svn-base @ 1524:82fac3dcf466 redmine-2.5-integration

Fix failure to interpret Javascript when autocompleting members for project
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Thu, 11 Sep 2014 10:24:38 +0100
parents cbb26bc654de
children
rev   line source
Chris@909 1 # Tests in this file ensure that:
Chris@909 2 #
Chris@909 3 # * Routes from plugins can be routed to
Chris@909 4 # * Named routes can be defined within a plugin
Chris@909 5
Chris@909 6 require File.dirname(__FILE__) + '/../test_helper'
Chris@909 7
Chris@909 8 class RoutesTest < ActionController::TestCase
Chris@909 9 tests TestRoutingController
Chris@909 10
Chris@909 11 def test_WITH_a_route_defined_in_a_plugin_IT_should_route_it
Chris@909 12 path = '/routes/an_action'
Chris@909 13 opts = {:controller => 'test_routing', :action => 'an_action'}
Chris@909 14 assert_routing path, opts
Chris@909 15 assert_recognizes opts, path # not sure what exactly the difference is, but it won't hurt either
Chris@909 16 end
Chris@909 17
Chris@909 18 def test_WITH_a_route_for_a_namespaced_controller_defined_in_a_plugin_IT_should_route_it
Chris@909 19 path = 'somespace/routes/an_action'
Chris@909 20 opts = {:controller => 'namespace/test_routing', :action => 'an_action'}
Chris@909 21 assert_routing path, opts
Chris@909 22 assert_recognizes opts, path
Chris@909 23 end
Chris@909 24
Chris@909 25 def test_should_properly_generate_named_routes
Chris@909 26 get :test_named_routes_from_plugin
Chris@909 27 assert_response_body '/somespace/routes'
Chris@909 28 end
Chris@909 29 end