]> git.openstreetmap.org Git - rails.git/blobdiff - test/models/issue_comment_test.rb
Add some basic testing of issue_comment model
[rails.git] / test / models / issue_comment_test.rb
index 53ba358895999bb54b3eff1e71a27d6c22a143f9..27fa9d66d878bbfeeee918ee6a3a6edd9c14196d 100644 (file)
@@ -1,7 +1,9 @@
 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
 end