From: Toshi MARUYAMA Date: Mon, 26 Oct 2020 13:35:00 +0000 (+0000) Subject: fix source indent of ApplicationHelperTest X-Git-Tag: 4.2.0~622 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=606ac82ae9681f19a8944e2dc47f0ecab89ba129;p=redmine.git fix source indent of ApplicationHelperTest git-svn-id: http://svn.redmine.org/redmine/trunk@20195 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/test/helpers/application_helper_test.rb b/test/helpers/application_helper_test.rb index 91f1b097a..ec196771e 100644 --- a/test/helpers/application_helper_test.rb +++ b/test/helpers/application_helper_test.rb @@ -1326,12 +1326,13 @@ class ApplicationHelperTest < Redmine::HelperTest end def test_text_formatting - to_test = {'*_+bold, italic and underline+_*' => 'bold, italic and underline', - '(_text within parentheses_)' => '(text within parentheses)', - 'a *Humane Web* Text Generator' => 'a Humane Web Text Generator', - 'a H *umane* W *eb* T *ext* G *enerator*' => 'a H umane W eb T ext G enerator', - 'a *H* umane *W* eb *T* ext *G* enerator' => 'a H umane W eb T ext G enerator', - } + to_test = { + '*_+bold, italic and underline+_*' => 'bold, italic and underline', + '(_text within parentheses_)' => '(text within parentheses)', + 'a *Humane Web* Text Generator' => 'a Humane Web Text Generator', + 'a H *umane* W *eb* T *ext* G *enerator*' => 'a H umane W eb T ext G enerator', + 'a *H* umane *W* eb *T* ext *G* enerator' => 'a H umane W eb T ext G enerator', + } to_test.each {|text, result| assert_equal "

#{result}

", textilizable(text)} end @@ -1480,14 +1481,14 @@ class ApplicationHelperTest < Redmine::HelperTest end if Object.const_defined?(:Redcarpet) - def test_toc_with_markdown_formatting_should_be_parsed - with_settings :text_formatting => 'markdown' do - assert_select_in textilizable("{{toc}}\n\n# Heading"), 'ul.toc li', :text => 'Heading' - assert_select_in textilizable("{{ 'Heading' - assert_select_in textilizable("{{>toc}}\n\n# Heading"), 'ul.toc.right li', :text => 'Heading' + def test_toc_with_markdown_formatting_should_be_parsed + with_settings :text_formatting => 'markdown' do + assert_select_in textilizable("{{toc}}\n\n# Heading"), 'ul.toc li', :text => 'Heading' + assert_select_in textilizable("{{ 'Heading' + assert_select_in textilizable("{{>toc}}\n\n# Heading"), 'ul.toc.right li', :text => 'Heading' + end end end - end def test_section_edit_links raw = <<~RAW