diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-12-15 11:02:24 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-12-15 11:02:24 +0000 |
commit | 77665b52523d13532c16c97090b83c7ef88e2b62 (patch) | |
tree | 1cdc7cc7be982e543bda47d47efaeb8c60966e6f /test | |
parent | 13756eb3a830e04493ebc048ae72e9271df4411c (diff) | |
download | redmine-77665b52523d13532c16c97090b83c7ef88e2b62.tar.gz redmine-77665b52523d13532c16c97090b83c7ef88e2b62.zip |
Store relation type instead of i18n key in journals (#15704).
git-svn-id: http://svn.redmine.org/redmine/trunk@12416 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/helpers/issues_helper_test.rb | 12 | ||||
-rw-r--r-- | test/unit/issue_relation_test.rb | 8 |
2 files changed, 10 insertions, 10 deletions
diff --git a/test/unit/helpers/issues_helper_test.rb b/test/unit/helpers/issues_helper_test.rb index ce27e6afe..0f87d45bc 100644 --- a/test/unit/helpers/issues_helper_test.rb +++ b/test/unit/helpers/issues_helper_test.rb @@ -213,7 +213,7 @@ class IssuesHelperTest < ActionView::TestCase def test_show_detail_relation_added detail = JournalDetail.new(:property => 'relation', - :prop_key => 'label_precedes', + :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>: Can't print recipes</i> added}, @@ -224,7 +224,7 @@ class IssuesHelperTest < ActionView::TestCase inexistant_issue_number = 9999 assert_nil Issue.find_by_id(inexistant_issue_number) detail = JournalDetail.new(:property => 'relation', - :prop_key => 'label_precedes', + :prop_key => 'precedes', :value => inexistant_issue_number) assert_equal "Precedes Issue ##{inexistant_issue_number} added", show_detail(detail, true) assert_equal "<strong>Precedes</strong> <i>Issue ##{inexistant_issue_number}</i> added", show_detail(detail, false) @@ -233,7 +233,7 @@ class IssuesHelperTest < ActionView::TestCase def test_show_detail_relation_added_should_not_disclose_issue_that_is_not_visible issue = Issue.generate!(:is_private => true) detail = JournalDetail.new(:property => 'relation', - :prop_key => 'label_precedes', + :prop_key => 'precedes', :value => issue.id) assert_equal "Precedes Issue ##{issue.id} added", show_detail(detail, true) @@ -242,7 +242,7 @@ class IssuesHelperTest < ActionView::TestCase def test_show_detail_relation_deleted detail = JournalDetail.new(:property => 'relation', - :prop_key => 'label_precedes', + :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>: Can't print recipes</i>\)}, @@ -253,7 +253,7 @@ class IssuesHelperTest < ActionView::TestCase inexistant_issue_number = 9999 assert_nil Issue.find_by_id(inexistant_issue_number) detail = JournalDetail.new(:property => 'relation', - :prop_key => 'label_precedes', + :prop_key => 'precedes', :old_value => inexistant_issue_number) assert_equal "Precedes deleted (Issue #9999)", show_detail(detail, true) assert_equal "<strong>Precedes</strong> deleted (<i>Issue #9999</i>)", show_detail(detail, false) @@ -262,7 +262,7 @@ class IssuesHelperTest < ActionView::TestCase def test_show_detail_relation_deleted_should_not_disclose_issue_that_is_not_visible issue = Issue.generate!(:is_private => true) detail = JournalDetail.new(:property => 'relation', - :prop_key => 'label_precedes', + :prop_key => 'precedes', :old_value => issue.id) assert_equal "Precedes deleted (Issue ##{issue.id})", show_detail(detail, true) diff --git a/test/unit/issue_relation_test.rb b/test/unit/issue_relation_test.rb index 6fc408353..7da6147fd 100644 --- a/test/unit/issue_relation_test.rb +++ b/test/unit/issue_relation_test.rb @@ -183,11 +183,11 @@ class IssueRelationTest < ActiveSupport::TestCase assert_equal from.journals.size, (from_journals + 1) assert_equal to.journals.size, (to_journals + 1) assert_equal 'relation', from.journals.last.details.last.property - assert_equal 'label_precedes', from.journals.last.details.last.prop_key + assert_equal 'precedes', from.journals.last.details.last.prop_key assert_equal '2', from.journals.last.details.last.value assert_nil from.journals.last.details.last.old_value assert_equal 'relation', to.journals.last.details.last.property - assert_equal 'label_follows', to.journals.last.details.last.prop_key + assert_equal 'follows', to.journals.last.details.last.prop_key assert_equal '1', to.journals.last.details.last.value assert_nil to.journals.last.details.last.old_value end @@ -205,11 +205,11 @@ class IssueRelationTest < ActiveSupport::TestCase assert_equal from.journals.size, (from_journals + 1) assert_equal to.journals.size, (to_journals + 1) assert_equal 'relation', from.journals.last.details.last.property - assert_equal 'label_blocks', from.journals.last.details.last.prop_key + assert_equal 'blocks', from.journals.last.details.last.prop_key assert_equal '9', from.journals.last.details.last.old_value assert_nil from.journals.last.details.last.value assert_equal 'relation', to.journals.last.details.last.property - assert_equal 'label_blocked_by', to.journals.last.details.last.prop_key + assert_equal 'blocked', to.journals.last.details.last.prop_key assert_equal '10', to.journals.last.details.last.old_value assert_nil to.journals.last.details.last.value end |