shorten long line of test/unit/lib/redmine/helpers/diff_test.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@20672 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA
2020-12-19 17:32:19 +00:00
parent cef7e91777
commit 2cd0507184

View File

@@ -32,8 +32,9 @@ class DiffTest < ActiveSupport::TestCase
after = "other stuff <script>alert('foo');</alert>"
computed_diff = Redmine::Helpers::Diff.new(before, after).to_html
expected_diff = '<span class="diff_in">&lt;stuff&gt; with html &amp; special chars&lt;/danger&gt;</span> <span class="diff_out">other stuff &lt;script&gt;alert(&#39;foo&#39;);&lt;/alert&gt;</span>'
expected_diff =
'<span class="diff_in">&lt;stuff&gt; with html &amp; special chars&lt;/danger&gt;</span>' \
' <span class="diff_out">other stuff &lt;script&gt;alert(&#39;foo&#39;);&lt;/alert&gt;</span>'
assert_equal computed_diff, expected_diff
end
end