Skip to content

Commit

Permalink
Merge pull request #48488 from eileencodes/remove-no-connection-prima…
Browse files Browse the repository at this point in the history
…ry-key-test

Remove no connection primary key test
  • Loading branch information
eileencodes committed Jun 15, 2023
2 parents 8a4543d + d31cb46 commit 87ab32f
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions activerecord/test/cases/primary_keys_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -270,31 +270,6 @@ def test_serial_with_unquoted_sequence_name
end
end

class PrimaryKeyWithNoConnectionTest < ActiveRecord::TestCase
class NoConnection < ActiveRecord::Base
self.abstract_class = true
self.primary_key = "foo"
end

self.use_transactional_tests = false

unless in_memory_db?
def test_set_primary_key_with_no_connection
NoConnection.establish_connection :arunit
# execute to fully establish a connection
NoConnection.connection.execute("SELECT 1")

assert NoConnection.connected?
assert_equal "foo", NoConnection.primary_key

ActiveRecord::Base.connection_handler.remove_connection_pool("PrimaryKeyWithNoConnectionTest::NoConnection")
assert_nil NoConnection.connected?

assert_equal "foo", NoConnection.primary_key
end
end
end

class PrimaryKeyWithAutoIncrementTest < ActiveRecord::TestCase
self.use_transactional_tests = false

Expand Down

0 comments on commit 87ab32f

Please sign in to comment.