]> git.openstreetmap.org Git - rails.git/blobdiff - test/models/diary_entry_test.rb
Change the display_name of suspended user fixuture
[rails.git] / test / models / diary_entry_test.rb
index 6981ebc43f1ada17ccb0e4bc04422d663654687f..5586b74d2e7b5d0c939e8ce50ae50199689daa9f 100644 (file)
@@ -44,8 +44,7 @@ class DiaryEntryTest < ActiveSupport::TestCase
   private
 
   def diary_entry_valid(attrs, result = true)
-    entry = DiaryEntry.new(attributes_for(:diary_entry))
-    entry.assign_attributes(attrs)
+    entry = build(:diary_entry, attrs)
     assert_equal result, entry.valid?, "Expected #{attrs.inspect} to be #{result}"
   end
 end