From 889a5ed77a991c34430f660314334274ef375a77 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 11 Feb 2014 07:27:30 +0000 Subject: [PATCH] Rails4: replace hard-coded html with class at IssuesHelperTest See r12784 comment. git-svn-id: http://svn.redmine.org/redmine/trunk@12872 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/helpers/issues_helper_test.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/unit/helpers/issues_helper_test.rb b/test/unit/helpers/issues_helper_test.rb index fd574db91..273755338 100644 --- a/test/unit/helpers/issues_helper_test.rb +++ b/test/unit/helpers/issues_helper_test.rb @@ -216,8 +216,9 @@ class IssuesHelperTest < ActionView::TestCase :prop_key => 'precedes', :value => 1) assert_equal "Precedes Bug #1: Can't print recipes added", show_detail(detail, true) - assert_match %r{Precedes Bug #1: #{ESCAPED_UCANT} print recipes added}, - show_detail(detail, false) + str = link_to("Bug #1", "/issues/1", :class => Issue.find(1).css_classes) + assert_equal "Precedes #{str}: #{ESCAPED_UCANT} print recipes added", + show_detail(detail, false) end def test_show_detail_relation_added_with_inexistant_issue @@ -245,7 +246,10 @@ class IssuesHelperTest < ActionView::TestCase :prop_key => 'precedes', :old_value => 1) assert_equal "Precedes deleted (Bug #1: Can't print recipes)", show_detail(detail, true) - assert_match %r{Precedes deleted \(Bug #1: #{ESCAPED_UCANT} print recipes\)}, + str = link_to("Bug #1", + "/issues/1", + :class => Issue.find(1).css_classes) + assert_equal "Precedes deleted (#{str}: #{ESCAPED_UCANT} print recipes)", show_detail(detail, false) end -- 2.39.5