]> git.openstreetmap.org Git - rails.git/commitdiff
Add factories for notes and note_comments
authorAndy Allan <git@gravitystorm.co.uk>
Thu, 6 Oct 2016 07:52:17 +0000 (08:52 +0100)
committerAndy Allan <git@gravitystorm.co.uk>
Thu, 6 Oct 2016 07:52:17 +0000 (08:52 +0100)
test/factories/note_comments.rb [new file with mode: 0644]
test/factories/notes.rb [new file with mode: 0644]

diff --git a/test/factories/note_comments.rb b/test/factories/note_comments.rb
new file mode 100644 (file)
index 0000000..b06dc37
--- /dev/null
@@ -0,0 +1,8 @@
+FactoryGirl.define do
+  factory :note_comment do
+    sequence(:body) { |n| "This is note comment #{n}" }
+    visible true
+    event "opened"
+    note
+  end
+end
diff --git a/test/factories/notes.rb b/test/factories/notes.rb
new file mode 100644 (file)
index 0000000..52c23e7
--- /dev/null
@@ -0,0 +1,7 @@
+FactoryGirl.define do
+  factory :note do
+    latitude 1 * GeoRecord::SCALE
+    longitude 1 * GeoRecord::SCALE
+    # tile QuadTile.tile_for_point(1,1)
+  end
+end