X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/683722ed5c1b3224a04c23b4d175a0638964f713..9387df91414616b9668185b72a9457e53937523d:/test/models/issue_comment_test.rb diff --git a/test/models/issue_comment_test.rb b/test/models/issue_comment_test.rb index e7f5f3442..7a1191ead 100644 --- a/test/models/issue_comment_test.rb +++ b/test/models/issue_comment_test.rb @@ -1,7 +1,14 @@ -require 'test_helper' +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