Load user and language fixtures for diary model tests
This commit is contained in:
parent
c83f15821d
commit
6a9b0f05b2
2 changed files with 4 additions and 0 deletions
|
@ -1,6 +1,8 @@
|
|||
require "test_helper"
|
||||
|
||||
class DiaryCommentTest < ActiveSupport::TestCase
|
||||
fixtures :users, :languages
|
||||
|
||||
test "body must be present" do
|
||||
comment = build(:diary_comment, :body => "")
|
||||
assert_not comment.valid?
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
require "test_helper"
|
||||
|
||||
class DiaryEntryTest < ActiveSupport::TestCase
|
||||
fixtures :users, :languages
|
||||
|
||||
def test_diary_entry_validations
|
||||
diary_entry_valid({})
|
||||
diary_entry_valid({ :title => "" }, false)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue