From 1baa09393cc056cedca7291e7a06b2daabf2a0cb Mon Sep 17 00:00:00 2001 From: Aidan Haran Date: Tue, 13 Aug 2024 17:18:55 +0100 Subject: [PATCH] Update coerced_tests.rb --- test/cases/coerced_tests.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/cases/coerced_tests.rb b/test/cases/coerced_tests.rb index 21d419c9b..44c7d2211 100644 --- a/test/cases/coerced_tests.rb +++ b/test/cases/coerced_tests.rb @@ -2419,7 +2419,9 @@ class QueryLogsTest < ActiveRecord::TestCase # SQL requires double single-quotes. coerce_tests! :test_sql_commenter_format def test_sql_commenter_format_coerced - ActiveRecord::QueryLogs.update_formatter(:sqlcommenter) + ActiveRecord::QueryLogs.tags_formatter = :sqlcommenter + ActiveRecord::QueryLogs.tags = [:application] + assert_queries_match(%r{/\*application=''active_record''\*/}) do Dashboard.first end @@ -2428,7 +2430,7 @@ def test_sql_commenter_format_coerced # SQL requires double single-quotes. coerce_tests! :test_sqlcommenter_format_value def test_sqlcommenter_format_value_coerced - ActiveRecord::QueryLogs.update_formatter(:sqlcommenter) + ActiveRecord::QueryLogs.tags_formatter = :sqlcommenter ActiveRecord::QueryLogs.tags = [ :application, @@ -2443,7 +2445,7 @@ def test_sqlcommenter_format_value_coerced # SQL requires double single-quotes. coerce_tests! :test_sqlcommenter_format_value_string_coercible def test_sqlcommenter_format_value_string_coercible_coerced - ActiveRecord::QueryLogs.update_formatter(:sqlcommenter) + ActiveRecord::QueryLogs.tags_formatter = :sqlcommenter ActiveRecord::QueryLogs.tags = [ :application, @@ -2458,7 +2460,7 @@ def test_sqlcommenter_format_value_string_coercible_coerced # SQL requires double single-quotes. coerce_tests! :test_sqlcommenter_format_allows_string_keys def test_sqlcommenter_format_allows_string_keys_coerced - ActiveRecord::QueryLogs.update_formatter(:sqlcommenter) + ActiveRecord::QueryLogs.tags_formatter = :sqlcommenter ActiveRecord::QueryLogs.tags = [ :application,