From a0b65445c4c02a14dde65ddc5a6707451ef79394 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 22 Oct 2025 18:39:56 +0100 Subject: [PATCH] Order tracepoints before asking for the first one This fixes a new warning in rails 8.1.0 about calling first on a query that does not have a defined order. --- test/controllers/api/traces_controller_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/controllers/api/traces_controller_test.rb b/test/controllers/api/traces_controller_test.rb index 2ed3c8721..547413c17 100644 --- a/test/controllers/api/traces_controller_test.rb +++ b/test/controllers/api/traces_controller_test.rb @@ -142,7 +142,7 @@ module Api # Validate tracepoints assert_equal 1, trace.points.size - tp = trace.points.first + tp = trace.points.order(:timestamp).first assert_equal 10000000, tp.latitude assert_equal 10000000, tp.longitude assert_equal 3221331576, tp.tile -- 2.39.5