]> git.openstreetmap.org Git - rails.git/blobdiff - test/models/trace_test.rb
Use activerecord-import for bulk importing tracepoint records
[rails.git] / test / models / trace_test.rb
index f03488a6115324e631624edf397f461d1960f8ed..81120f0e776e0c1103560f153f50912eed50d096 100644 (file)
@@ -206,6 +206,10 @@ class TraceTest < ActiveSupport::TestCase
 
       trace.reload
       assert_equal 1, Tracepoint.where(:gpx_id => trace.id).count
+
+      # Check that the tile has been set prior to the bulk import
+      # i.e. that the callbacks have been run correctly
+      assert_equal 3221331576, Tracepoint.where(:gpx_id => trace.id).first.tile
     end
   end