diff --git a/Gemfile.lock b/Gemfile.lock index dd6067499b28d..07639b68d6822 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,10 +1,10 @@ GIT remote: https://github.com/github/trilogy.git - revision: 8e4ae98569c12894da9bcbee5edb32b76068dbfd + revision: a1f46bbb79f866c157ead6d483474670bdb17334 branch: main glob: contrib/ruby/*.gemspec specs: - trilogy (2.4.0) + trilogy (2.4.1) GIT remote: https://github.com/matthewd/websocket-client-simple.git diff --git a/activerecord/test/cases/adapters/trilogy/trilogy_adapter_test.rb b/activerecord/test/cases/adapters/trilogy/trilogy_adapter_test.rb index ecfa1fd8952e7..10a50e5024664 100644 --- a/activerecord/test/cases/adapters/trilogy/trilogy_adapter_test.rb +++ b/activerecord/test/cases/adapters/trilogy/trilogy_adapter_test.rb @@ -29,7 +29,9 @@ class TrilogyAdapterTest < ActiveRecord::TrilogyTestCase end test "#supports_json answers true without Maria DB and greater version" do - assert @conn.supports_json? + @conn.stub(:mariadb?, false) do + assert_equal true, @conn.supports_json? + end end test "#supports_json answers false without Maria DB and lesser version" do diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb index 971acf15b2e8d..666a5dbd23d9d 100644 --- a/activerecord/test/cases/migration_test.rb +++ b/activerecord/test/cases/migration_test.rb @@ -1465,13 +1465,12 @@ def test_default_functions_on_columns if current_adapter?(:PostgreSQLAdapter) assert_equal "gen_random_uuid()", column(:name).default_function Person.connection.execute("INSERT INTO delete_me DEFAULT VALUES") - person_data = Person.connection.execute("SELECT * FROM delete_me ORDER BY id DESC").to_a.first else assert_equal "uuid()", column(:name).default_function Person.connection.execute("INSERT INTO delete_me () VALUES ()") - person_data = Person.connection.execute("SELECT * FROM delete_me ORDER BY id DESC").to_a(as: :hash).first end + person_data = Person.connection.select_one("SELECT * FROM delete_me ORDER BY id DESC") assert_match(/\A(.+)-(.+)-(.+)-(.+)\Z/, person_data.fetch("name")) end end