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