openstreetmap-website/test/models/issue_comment_test.rb
Harry Wood 3ca8b63643 Put issue comments through kramdown formatter
On issue comments (which only admins can create or see), put the `body` text through kramdown formatting.
2022-05-06 13:36:59 +01:00

14 lines
353 B
Ruby

require "test_helper"
class IssueCommentTest < ActiveSupport::TestCase
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