From 1cc269967ab96746f506e05abf95d63407b63bc4 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 20 Jun 2019 16:46:10 +0000 Subject: Add a randomized name attribute to all form fields (#26604). This is a workaround for a Bug in Firefox described at https://bugzilla.mozilla.org/show_bug.cgi?id=1279253 Patch by Holger Just. git-svn-id: http://svn.redmine.org/redmine/trunk@18306 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/helpers/application_helper_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/helpers') diff --git a/test/helpers/application_helper_test.rb b/test/helpers/application_helper_test.rb index f46720120..9abf47fa7 100644 --- a/test/helpers/application_helper_test.rb +++ b/test/helpers/application_helper_test.rb @@ -1807,6 +1807,15 @@ RAW assert_equal '0.75', html_hours('0.75') end + def test_form_for_includes_name_attribute + assert_match(/name="new_issue-[a-z0-9]{8}"/, form_for(Issue.new){}) + end + + def test_labelled_form_for_includes_name_attribute + assert_match(/name="new_issue-[a-z0-9]{8}"/, labelled_form_for(Issue.new){}) + end + + private def wiki_links_with_special_characters -- cgit v1.2.3