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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test no longer need to be coerced as insert_all is now supported #1316

Merged
merged 1 commit into from
Mar 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions test/cases/coerced_tests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2587,22 +2587,6 @@ def invalid_add_column_option_exception_message(key)
end
end

# SQL Server does not support upsert. Removed dependency on `insert_all` that uses upsert.
class ActiveRecord::Encryption::ConcurrencyTest < ActiveRecord::EncryptionTestCase
undef_method :thread_encrypting_and_decrypting
def thread_encrypting_and_decrypting(thread_label)
posts = 100.times.collect { |index| EncryptedPost.create! title: "Article #{index} (#{thread_label})", body: "Body #{index} (#{thread_label})" }

Thread.new do
posts.each.with_index do |article, index|
assert_encrypted_attribute article, :title, "Article #{index} (#{thread_label})"
article.decrypt
assert_not_encrypted_attribute article, :title, "Article #{index} (#{thread_label})"
end
end
end
end

# Need to use `install_unregistered_type_fallback` instead of `install_unregistered_type_error` so that message-pack
# can read and write `ActiveRecord::ConnectionAdapters::SQLServer::Type::Data` objects.
class ActiveRecordMessagePackTest < ActiveRecord::TestCase
Expand Down