diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-02-11 07:27:30 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-02-11 07:27:30 +0000 |
commit | 889a5ed77a991c34430f660314334274ef375a77 (patch) | |
tree | ba9517955544ce23c541be0b6728c077b320d4c8 /test/unit/helpers/issues_helper_test.rb | |
parent | 71f8fe1519b20b06c316fe5cd4f283bc95a01ee9 (diff) | |
download | redmine-889a5ed77a991c34430f660314334274ef375a77.tar.gz redmine-889a5ed77a991c34430f660314334274ef375a77.zip |
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
Diffstat (limited to 'test/unit/helpers/issues_helper_test.rb')
-rw-r--r-- | test/unit/helpers/issues_helper_test.rb | 10 |
1 files 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{<strong>Precedes</strong> <i><a href="/issues/1" class=".+">Bug #1</a>: #{ESCAPED_UCANT} print recipes</i> added}, - show_detail(detail, false) + str = link_to("Bug #1", "/issues/1", :class => Issue.find(1).css_classes) + assert_equal "<strong>Precedes</strong> <i>#{str}: #{ESCAPED_UCANT} print recipes</i> 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{<strong>Precedes</strong> deleted \(<i><a href="/issues/1" class=".+">Bug #1</a>: #{ESCAPED_UCANT} print recipes</i>\)}, + str = link_to("Bug #1", + "/issues/1", + :class => Issue.find(1).css_classes) + assert_equal "<strong>Precedes</strong> deleted (<i>#{str}: #{ESCAPED_UCANT} print recipes</i>)", show_detail(detail, false) end |