diff options
Diffstat (limited to 'test/unit/helpers/issues_helper_test.rb')
-rw-r--r-- | test/unit/helpers/issues_helper_test.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/unit/helpers/issues_helper_test.rb b/test/unit/helpers/issues_helper_test.rb index dcb1aed85..7a40abe08 100644 --- a/test/unit/helpers/issues_helper_test.rb +++ b/test/unit/helpers/issues_helper_test.rb @@ -47,6 +47,25 @@ class IssuesHelperTest < HelperTestCase def test_issue_heading assert_equal "Bug #1", issue_heading(Issue.find(1)) end + + def test_issues_destroy_confirmation_message_with_one_root_issue + assert_equal l(:text_issues_destroy_confirmation), issues_destroy_confirmation_message(Issue.find(1)) + end + + def test_issues_destroy_confirmation_message_with_an_arrayt_of_root_issues + assert_equal l(:text_issues_destroy_confirmation), issues_destroy_confirmation_message(Issue.find([1, 2])) + end + + def test_issues_destroy_confirmation_message_with_one_parent_issue + Issue.find(2).update_attribute :parent_issue_id, 1 + assert_equal l(:text_issues_destroy_confirmation) + "\n" + l(:text_issues_destroy_descendants_confirmation, :count => 1), + issues_destroy_confirmation_message(Issue.find(1)) + end + + def test_issues_destroy_confirmation_message_with_one_parent_issue_and_its_child + Issue.find(2).update_attribute :parent_issue_id, 1 + assert_equal l(:text_issues_destroy_confirmation), issues_destroy_confirmation_message(Issue.find([1, 2])) + end context "IssuesHelper#show_detail" do context "with no_html" do |