Do not journalize blank description changes (#8712).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6147 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -733,6 +733,22 @@ class IssueTest < ActiveSupport::TestCase
|
||||
assert_equal old_description, detail.old_value
|
||||
assert_equal new_description, detail.value
|
||||
end
|
||||
|
||||
def test_blank_descriptions_should_not_be_journalized
|
||||
IssueCustomField.delete_all
|
||||
Issue.update_all("description = NULL", "id=1")
|
||||
|
||||
i = Issue.first
|
||||
i.init_journal(User.find(2))
|
||||
i.subject = "blank description"
|
||||
i.description = "\r\n"
|
||||
|
||||
assert_difference 'Journal.count', 1 do
|
||||
assert_difference 'JournalDetail.count', 1 do
|
||||
i.save!
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def test_saving_twice_should_not_duplicate_journal_details
|
||||
i = Issue.find(:first)
|
||||
|
||||
Reference in New Issue
Block a user