]> git.openstreetmap.org Git - rails.git/blobdiff - test/models/issue_comment_test.rb
Show edit buttons on active blocks to all moderators
[rails.git] / test / models / issue_comment_test.rb
index 53ba358895999bb54b3eff1e71a27d6c22a143f9..7a1191ead0052653ebf49bd9da8310dea0e36eb6 100644 (file)
@@ -1,7 +1,14 @@
 require "test_helper"
 
 class IssueCommentTest < ActiveSupport::TestCase
 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
 end