- assert_not trace.inserted
- assert_equal File.new(fixture).read, File.new(trace.trace_name).read
+ assert trace.inserted
+ assert_equal File.new(fixture).read, trace.file.blob.download
+
+ # Validate tracepoints
+ assert_equal 1, trace.points.size
+ tp = trace.points.first
+ assert_equal 10000000, tp.latitude
+ assert_equal 10000000, tp.longitude
+ assert_equal 3221331576, tp.tile
+ assert_equal 0, tp.trackid
+ assert_in_delta(134.0, tp.altitude)
+ assert_equal DateTime.parse("2008-10-01T10:10:10.000Z"), tp.timestamp
+