summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
191f6b3)
Replaces unnecessary test.
require "test_helper"
class DiaryCommentTest < ActiveSupport::TestCase
require "test_helper"
class DiaryCommentTest < ActiveSupport::TestCase
- def test_diary_comment_exists
- comment = create(:diary_comment)
- assert_includes DiaryComment.all, comment
+ test "body must be present" do
+ comment = build(:diary_comment, :body => "")
+ assert_not comment.valid?
+ assert_not_nil comment.errors[:body], "no validation error for missing body"