- assert_equal true, create(:note, :status => "closed", :closed_at => Time.now).closed?
- assert_equal false, create(:note, :status => "open", :closed_at => nil).closed?
+ assert_predicate create(:note, :closed), :closed?
+ assert_not_predicate create(:note, :status => "open", :closed_at => nil), :closed?
+ end
+
+ def test_description
+ note = create(:note)
+ assert_equal "Default note's description", note.description
+
+ note = create(:note, :description => "Test description #1")
+ assert_equal "Test description #1", note.description
+
+ comment = create(:note_comment)
+ assert_equal "Default note's description", comment.note.description
+
+ comment = create(:note_comment, :note => build(:note, :description => "Test description #2"))
+ assert_equal "Test description #2", comment.note.description