summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-12-09 14:12:00 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-12-09 14:12:00 +0000
commitd02eed94d9d3edd94d72857313080a2fea2ebc96 (patch)
tree4e97225afe0d7824f5c827cb95d5d07c508cdaf0 /test
parent4273e9decf7249c9a729624f01134f953fadc450 (diff)
downloadredmine-d02eed94d9d3edd94d72857313080a2fea2ebc96.tar.gz
redmine-d02eed94d9d3edd94d72857313080a2fea2ebc96.zip
shorten long line of SearchHelperTest
git-svn-id: http://svn.redmine.org/redmine/trunk@20593 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/helpers/search_helper_test.rb15
1 files changed, 12 insertions, 3 deletions
diff --git a/test/helpers/search_helper_test.rb b/test/helpers/search_helper_test.rb
index 9632089ae..53e85f3e1 100644
--- a/test/helpers/search_helper_test.rb
+++ b/test/helpers/search_helper_test.rb
@@ -29,8 +29,12 @@ class SearchHelperTest < Redmine::HelperTest
end
def test_highlight_multiple_tokens
- assert_equal 'This is a <span class="highlight token-0">token</span> and <span class="highlight token-1">another</span> <span class="highlight token-0">token</span>.',
- highlight_tokens('This is a token and another token.', %w(token another))
+ assert_equal(
+ 'This is a <span class="highlight token-0">token</span> and ' \
+ '<span class="highlight token-1">another</span> ' \
+ '<span class="highlight token-0">token</span>.',
+ highlight_tokens('This is a token and another token.', %w(token another))
+ )
end
def test_highlight_should_not_exceed_maximum_length
@@ -43,6 +47,11 @@ class SearchHelperTest < Redmine::HelperTest
def test_highlight_multibyte
s = ('й' * 200) + ' token ' + ('й' * 200)
r = highlight_tokens(s, %w(token))
- assert_equal ('й' * 45) + ' ... ' + ('й' * 44) + ' <span class="highlight token-0">token</span> ' + ('й' * 44) + ' ... ' + ('й' * 45), r
+ assert_equal(
+ ('й' * 45) + ' ... ' + ('й' * 44) +
+ ' <span class="highlight token-0">token</span> ' +
+ ('й' * 44) + ' ... ' + ('й' * 45),
+ r
+ )
end
end