update factories + tests

This commit is contained in:
Albert Yi
2019-05-10 17:31:07 -07:00
parent 32b4e0a01e
commit 04edc3f533
26 changed files with 81 additions and 83 deletions

View File

@@ -68,7 +68,7 @@ class NoteTest < ActiveSupport::TestCase
end
should "not validate if the body is blank" do
@note = FactoryBot.build(:note, body: " ")
@note = FactoryBot.build(:note, body: " ", :post => @post)
assert_equal(false, @note.valid?)
assert_equal(["Body can't be blank"], @note.errors.full_messages)