Wrong redmine link after referencing an object from a different project (#12930).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11258 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2013-01-22 20:40:39 +00:00
parent a4c10376ce
commit c7df78f3b6
2 changed files with 11 additions and 1 deletions

View File

@@ -352,6 +352,15 @@ RAW
to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text), "#{text} failed" }
end
def test_redmine_links_with_a_different_project_before_current_project
vp1 = Version.generate!(:project_id => 1, :name => '1.4.4')
vp3 = Version.generate!(:project_id => 3, :name => '1.4.4')
@project = Project.find(3)
assert_equal %(<p><a href="/versions/#{vp1.id}" class="version">1.4.4</a> <a href="/versions/#{vp3.id}" class="version">1.4.4</a></p>),
textilizable("ecookbook:version:1.4.4 version:1.4.4")
end
def test_escaped_redmine_links_should_not_be_parsed
to_test = [
'#3.',