Redmine 4.1.1

This commit is contained in:
Manuel Cillero 2020-11-22 21:20:06 +01:00
parent 33e7b881a5
commit 3d976f1b3b
1593 changed files with 36180 additions and 19489 deletions

View file

@ -1,5 +1,7 @@
# frozen_string_literal: true
# Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang
# Copyright (C) 2006-2019 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -64,19 +66,32 @@ DIFF
<p>link: <a class="external" href="https://www.redmine.org">https://www.redmine.org</a><br />
<a class="external" href="http://www.redmine.org">http://www.redmine.org</a></p>
EXPECTED
assert_equal expected.gsub(%r{[\r\n\t]}, ''), Redmine::WikiFormatting::NullFormatter::Formatter.new(raw).to_html.gsub(%r{[\r\n\t]}, '')
end
def test_supports_section_edit
with_settings :text_formatting => 'textile' do
assert_equal true, Redmine::WikiFormatting.supports_section_edit?
end
with_settings :text_formatting => '' do
assert_equal false, Redmine::WikiFormatting.supports_section_edit?
end
end
def test_hires_images_should_not_be_recognized_as_email_addresses
raw = <<-DIFF
Image: logo@2x.png
DIFF
expected = <<-EXPECTED
<p>Image: logo@2x.png</p>
EXPECTED
assert_equal expected.gsub(%r{[\r\n\t]}, ''), Redmine::WikiFormatting::NullFormatter::Formatter.new(raw).to_html.gsub(%r{[\r\n\t]}, '')
end
def test_cache_key_for_saved_object_should_no_be_nil
assert_not_nil Redmine::WikiFormatting.cache_key_for('textile', 'Text', Issue.find(1), :description)
end