Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7-0-stable] Backport: Remove no connection primary key test #48697

Merged
merged 1 commit into from Jul 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 0 additions & 19 deletions activerecord/test/cases/primary_keys_test.rb
Expand Up @@ -227,25 +227,6 @@ def test_serial_with_unquoted_sequence_name
end
end

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

unless in_memory_db?
def test_set_primary_key_with_no_connection
connection = ActiveRecord::Base.remove_connection

model = Class.new(ActiveRecord::Base)
model.primary_key = "foo"

assert_equal "foo", model.primary_key

ActiveRecord::Base.establish_connection(connection)

assert_equal "foo", model.primary_key
end
end
end

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

Expand Down