]> git.openstreetmap.org Git - rails.git/blobdiff - test/factories/notes.rb
Avoid double-escaping diary entry titles
[rails.git] / test / factories / notes.rb
index 52c23e7d69cd9ead70abf291e7522101f5710d18..9dbcdf58cc94b02ba7a8b80c0f830add09169b87 100644 (file)
@@ -3,5 +3,15 @@ FactoryGirl.define do
     latitude 1 * GeoRecord::SCALE
     longitude 1 * GeoRecord::SCALE
     # tile QuadTile.tile_for_point(1,1)
+
+    factory :note_with_comments do
+      transient do
+        comments_count 1
+      end
+
+      after(:create) do |note, evaluator|
+        create_list(:note_comment, evaluator.comments_count, :note => note)
+      end
+    end
   end
 end