]> git.openstreetmap.org Git - rails.git/blob - test/models/diary_comment_test.rb
Merge remote-tracking branch 'upstream/pull/2023'
[rails.git] / test / models / diary_comment_test.rb
1 require "test_helper"
2
3 class DiaryCommentTest < ActiveSupport::TestCase
4   def setup
5     # Create the default language for diary entries
6     create(:language, :code => "en")
7   end
8
9   test "body must be present" do
10     comment = build(:diary_comment, :body => "")
11     assert_not comment.valid?
12     assert_not_nil comment.errors[:body], "no validation error for missing body"
13   end
14 end