From be907108e795b1de2aac1000033c1c6f82677098 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marius=20B=C4=82LTEANU?= Date: Thu, 29 Oct 2026 00:15:34 +0200 Subject: [PATCH] Fix ApplicationHelperTest#test_wiki_textarea_stimulus_attributes tests that were never run (#44692).. --- test/helpers/application_helper_test.rb | 40 +++++++++++++------------ 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/test/helpers/application_helper_test.rb b/test/helpers/application_helper_test.rb index 5b3c8f2cc..713b6570d 100644 --- a/test/helpers/application_helper_test.rb +++ b/test/helpers/application_helper_test.rb @@ -2504,6 +2504,27 @@ class ApplicationHelperTest < Redmine::HelperTest assert_equal '', result end + def test_wiki_textarea_stimulus_attributes + with_settings :text_formatting => 'textile' do + expected = { + controller: "list-autofill selection-indent table-paste", + action: "beforeinput->list-autofill#handleBeforeInput keydown.tab->selection-indent#run " \ + "keydown.shift+tab->selection-indent#run paste->table-paste#handlePaste", + list_autofill_text_formatting_param: "textile", + selection_indent_text_formatting_param: "textile", + table_paste_text_formatting_param: "textile" + } + + assert_equal expected, wiki_textarea_stimulus_attributes + end + end + + def test_wiki_textarea_stimulus_attributes_with_blank_text_formatting + with_settings :text_formatting => '' do + assert_equal({}, wiki_textarea_stimulus_attributes) + end + end + private def wiki_links_with_special_characters @@ -2534,23 +2555,4 @@ class ApplicationHelperTest < Redmine::HelperTest :class => "wiki-page new"), } end - - def test_wiki_textarea_stimulus_attributes - with_settings :text_formatting => 'textile' do - expected = { - controller: "list-autofill table-paste", - action: "beforeinput->list-autofill#handleBeforeInput paste->table-paste#handlePaste", - list_autofill_text_formatting_param: "textile", - table_paste_text_formatting_param: "textile" - } - - assert_equal expected, wiki_textarea_stimulus_attributes - end - end - - def test_wiki_textarea_stimulus_attributes_with_blank_text_formatting - with_settings :text_formatting => '' do - assert_equal({}, wiki_textarea_stimulus_attributes) - end - end end -- 2.54.0 (Apple Git-157)