Mercurial > hg > soundsoftware-site
diff test/unit/issue_test.rb @ 507:0c939c159af4 redmine-1.2
Update to Redmine 1.2.1 on 1.2-stable branch (Redmine SVN rev 6270)
author | Chris Cannam |
---|---|
date | Thu, 14 Jul 2011 10:32:19 +0100 |
parents | cbce1fd3b1b7 |
children | cbb26bc654de |
line wrap: on
line diff
--- a/test/unit/issue_test.rb Mon Jun 06 14:24:13 2011 +0100 +++ b/test/unit/issue_test.rb Thu Jul 14 10:32:19 2011 +0100 @@ -733,6 +733,27 @@ 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.find(1) + 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_description_eol_should_be_normalized + i = Issue.new(:description => "CR \r LF \n CRLF \r\n") + assert_equal "CR \r\n LF \r\n CRLF \r\n", i.description + end def test_saving_twice_should_not_duplicate_journal_details i = Issue.find(:first)