Skip to content

Commit 1e3fcd4

Browse files
authored
Merge pull request rails#52560 from yahonda/another_follow_up_52542
Address test_disable_extension_with_schema failure
2 parents a27076d + b48d2b2 commit 1e3fcd4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,8 @@ def test_date_decoding_disabled
671671

672672
def test_disable_extension_with_schema
673673
@connection.execute("CREATE SCHEMA custom_schema")
674-
@connection.execute("CREATE EXTENSION IF NOT EXISTS hstore SCHEMA custom_schema")
674+
@connection.execute("DROP EXTENSION IF EXISTS hstore")
675+
@connection.execute("CREATE EXTENSION hstore SCHEMA custom_schema")
675676
result = @connection.query("SELECT extname FROM pg_extension WHERE extnamespace = (SELECT oid FROM pg_namespace WHERE nspname = 'custom_schema')")
676677
assert_equal [["hstore"]], result.to_a
677678

@@ -684,7 +685,8 @@ def test_disable_extension_with_schema
684685
end
685686

686687
def test_disable_extension_without_schema
687-
@connection.execute("CREATE EXTENSION IF NOT EXISTS hstore")
688+
@connection.execute("DROP EXTENSION IF EXISTS hstore")
689+
@connection.execute("CREATE EXTENSION hstore")
688690
result = @connection.query("SELECT extname FROM pg_extension")
689691
assert_includes result.to_a, ["hstore"]
690692

0 commit comments

Comments
 (0)