X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/d3700e6201b4b78a70bbb2941572edc985b63c2c..7df13ff2d3b369b571b6d85fd1a2997290c5541f:/test/models/issue_comment_test.rb?ds=sidebyside diff --git a/test/models/issue_comment_test.rb b/test/models/issue_comment_test.rb index 53ba35889..7a1191ead 100644 --- a/test/models/issue_comment_test.rb +++ b/test/models/issue_comment_test.rb @@ -1,7 +1,14 @@ require "test_helper" class IssueCommentTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end + test "body must be present" do + comment = build(:issue_comment, :body => "") + assert_not comment.valid? + assert_not_nil comment.errors[:body] + end + + test "body" do + comment = create(:issue_comment) + assert_instance_of(RichText::Markdown, comment.body) + end end