Skip to content

Commit 7e0df2f

Browse files
authored
Merge pull request rails#52528 from yahonda/follow_up_52452
Address `PostgreSQLAdapterTest#test_disable_extension_without_schema` error
2 parents cd912ad + 32cd74a commit 7e0df2f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ 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 hstore SCHEMA custom_schema")
674+
@connection.execute("CREATE EXTENSION IF NOT EXISTS hstore SCHEMA custom_schema")
675675
result = @connection.query("SELECT extname FROM pg_extension WHERE extnamespace = (SELECT oid FROM pg_namespace WHERE nspname = 'custom_schema')")
676676
assert_equal [["hstore"]], result.to_a
677677

@@ -684,7 +684,7 @@ def test_disable_extension_with_schema
684684
end
685685

686686
def test_disable_extension_without_schema
687-
@connection.execute("CREATE EXTENSION hstore")
687+
@connection.execute("CREATE EXTENSION IF NOT EXISTS hstore")
688688
result = @connection.query("SELECT extname FROM pg_extension")
689689
assert_includes result.to_a, ["hstore"]
690690

0 commit comments

Comments
 (0)