3 class DiaryCommentTest < ActiveSupport::TestCase
4 fixtures :users, :languages
6 test "body must be present" do
7 comment = build(:diary_comment, :body => "")
8 assert_not comment.valid?
9 assert_not_nil comment.errors[:body], "no validation error for missing body"