]> git.openstreetmap.org Git - rails.git/blobdiff - test/models/issue_comment_test.rb
Remove callback from initialize() in note js controller
[rails.git] / test / models / issue_comment_test.rb
index e7f5f3442f492dde6f18d20b6c00519fb94fd349..7a1191ead0052653ebf49bd9da8310dea0e36eb6 100644 (file)
@@ -1,7 +1,14 @@
-require 'test_helper'
+require "test_helper"
 
 class IssueCommentTest < ActiveSupport::TestCase
 
 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
 end