From c71f8bfd5a6b690c6ece0b5eb37182b265fd9d6d Mon Sep 17 00:00:00 2001 From: Alexander Meindl Date: Wed, 13 Dec 2023 08:25:38 +0100 Subject: [PATCH] provide fixture_date_format for rails 6 and rails 7 support --- test/global_test_helper.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/global_test_helper.rb b/test/global_test_helper.rb index 6606ee52..afdbda6a 100644 --- a/test/global_test_helper.rb +++ b/test/global_test_helper.rb @@ -194,5 +194,10 @@ def assert_dashboard_query_blocks(blocks = []) def columns_in_projects_list css_select('table.projects thead th').map(&:text) end + + # should be dropped after dropping Rails 6.x support / Redmine 5.1 support + def self.fixture_date_format(date) + date.try(:to_fs, :db) || date.to_s(:db) + end end end