From bfdd9f7c295d539a9f8aeb22f965a620ea415224 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 30 Dec 2014 11:24:00 +0000 Subject: The descendant count in the issues delete confirmation message is wrong if issues share some descendants. git-svn-id: http://svn.redmine.org/redmine/trunk@13818 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/helpers/issues_helper_test.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/unit') diff --git a/test/unit/helpers/issues_helper_test.rb b/test/unit/helpers/issues_helper_test.rb index cf681882c..393533fd3 100644 --- a/test/unit/helpers/issues_helper_test.rb +++ b/test/unit/helpers/issues_helper_test.rb @@ -68,6 +68,16 @@ class IssuesHelperTest < ActionView::TestCase issues_destroy_confirmation_message(Issue.find([1, 2])) end + def test_issues_destroy_confirmation_message_with_issues_that_share_descendants + root = Issue.generate! + child = Issue.generate!(:parent_issue_id => root.id) + Issue.generate!(:parent_issue_id => child.id) + + assert_equal l(:text_issues_destroy_confirmation) + "\n" + + l(:text_issues_destroy_descendants_confirmation, :count => 1), + issues_destroy_confirmation_message([root.reload, child.reload]) + end + test 'show_detail with no_html should show a changing attribute' do detail = JournalDetail.new(:property => 'attr', :old_value => '40', :value => '100', :prop_key => 'done_ratio') -- cgit v1.2.3