aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/routing_test.rb7
-rw-r--r--actionpack/test/template/text_helper_test.rb1
2 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb
index b28f7bcdff..5e5503fd52 100644
--- a/actionpack/test/controller/routing_test.rb
+++ b/actionpack/test/controller/routing_test.rb
@@ -50,6 +50,13 @@ class UriReservedCharactersRoutingTest < Test::Unit::TestCase
:additional => ["add#{@segment}itional-1", "add#{@segment}itional-2"] }
assert_equal options, @set.recognize_path("/controller/act#{@escaped}ion/var#{@escaped}iable/add#{@escaped}itional-1/add#{@escaped}itional-2")
end
+
+ def test_route_generation_allows_passing_non_string_values_to_generated_helper
+ assert_equal "/controller/action/variable/1/2", @set.generate(:controller => "controller",
+ :action => "action",
+ :variable => "variable",
+ :additional => [1, 2])
+ end
end
class LegacyRouteSetTests < Test::Unit::TestCase
diff --git a/actionpack/test/template/text_helper_test.rb b/actionpack/test/template/text_helper_test.rb
index 06e1fd1929..337697bf5c 100644
--- a/actionpack/test/template/text_helper_test.rb
+++ b/actionpack/test/template/text_helper_test.rb
@@ -262,6 +262,7 @@ class TextHelperTest < ActionView::TestCase
assert_equal email2_result, auto_link(email2_raw)
assert_equal '', auto_link(nil)
assert_equal '', auto_link('')
+ assert_equal "#{link_result} #{link_result} #{link_result}", auto_link("#{link_raw} #{link_raw} #{link_raw}")
end
def test_auto_link_at_eol