diff options
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/dispatch/routing_test.rb | 2 | ||||
-rw-r--r-- | actionpack/test/template/form_helper_test.rb | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb index 3689b17877..711c03eca6 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -2550,7 +2550,7 @@ class TestUnicodePaths < ActionDispatch::IntegrationTest Routes = ActionDispatch::Routing::RouteSet.new.tap do |app| app.draw do match "/#{Rack::Utils.escape("ほげ")}" => lambda { |env| - path_params = env['action_dispatch.request.path_parameters'] + env['action_dispatch.request.path_parameters'] [200, { 'Content-Type' => 'text/plain' }, []] }, :as => :unicode_path end diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb index 39d4768861..8680631a48 100644 --- a/actionpack/test/template/form_helper_test.rb +++ b/actionpack/test/template/form_helper_test.rb @@ -215,6 +215,10 @@ class FormHelperTest < ActionView::TestCase assert_dom_equal('<label for="my_for">Title</label>', label(:post, :title, nil, "for" => "my_for")) end + def test_label_does_not_generate_for_attribute_when_given_nil + assert_dom_equal('<label>Title</label>', label(:post, :title, :for => nil)) + end + def test_label_with_id_attribute_as_symbol assert_dom_equal('<label for="post_title" id="my_id">Title</label>', label(:post, :title, nil, :id => "my_id")) end |