Mercurial > hg > soundsoftware-site
comparison 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 |
comparison
equal
deleted
inserted
replaced
441:cbce1fd3b1b7 | 507:0c939c159af4 |
---|---|
731 assert_equal 'attr', detail.property | 731 assert_equal 'attr', detail.property |
732 assert_equal 'description', detail.prop_key | 732 assert_equal 'description', detail.prop_key |
733 assert_equal old_description, detail.old_value | 733 assert_equal old_description, detail.old_value |
734 assert_equal new_description, detail.value | 734 assert_equal new_description, detail.value |
735 end | 735 end |
736 | |
737 def test_blank_descriptions_should_not_be_journalized | |
738 IssueCustomField.delete_all | |
739 Issue.update_all("description = NULL", "id=1") | |
740 | |
741 i = Issue.find(1) | |
742 i.init_journal(User.find(2)) | |
743 i.subject = "blank description" | |
744 i.description = "\r\n" | |
745 | |
746 assert_difference 'Journal.count', 1 do | |
747 assert_difference 'JournalDetail.count', 1 do | |
748 i.save! | |
749 end | |
750 end | |
751 end | |
752 | |
753 def test_description_eol_should_be_normalized | |
754 i = Issue.new(:description => "CR \r LF \n CRLF \r\n") | |
755 assert_equal "CR \r\n LF \r\n CRLF \r\n", i.description | |
756 end | |
736 | 757 |
737 def test_saving_twice_should_not_duplicate_journal_details | 758 def test_saving_twice_should_not_duplicate_journal_details |
738 i = Issue.find(:first) | 759 i = Issue.find(:first) |
739 i.init_journal(User.find(2), 'Some notes') | 760 i.init_journal(User.find(2), 'Some notes') |
740 # initial changes | 761 # initial changes |