From 7715eb8c74f594d2e4b314520efe0605b4da666c Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Fri, 21 Mar 2025 01:14:09 +0300 Subject: [PATCH] Test if max_id is present in heatmap data --- test/controllers/users_controller_test.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/controllers/users_controller_test.rb b/test/controllers/users_controller_test.rb index 1cb748a9d..852247865 100644 --- a/test/controllers/users_controller_test.rb +++ b/test/controllers/users_controller_test.rb @@ -343,7 +343,9 @@ class UsersControllerTest < ActionDispatch::IntegrationTest assert_not_nil heatmap_data assert_predicate heatmap_data[:data], :any? # The data should be in the right format - assert(heatmap_data[:data].values.all? { |entry| entry[:date] && entry[:total_changes] }, "Heatmap data should have :date and :total_changes keys") + heatmap_data[:data].each_value do |entry| + assert_equal [:date, :max_id, :total_changes], entry.keys.sort, "Heatmap data entries should have expected keys" + end assert_equal 30, heatmap_data[:count] end -- 2.39.5