File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -2474,3 +2474,18 @@ def invalid_add_column_option_exception_message(key)
24742474 end
24752475 end
24762476end
2477+
2478+ # SQL Server does not support upsert. Removed dependency on `insert_all` that uses upsert.
2479+ class ActiveRecord ::Encryption ::ConcurrencyTest < ActiveRecord ::EncryptionTestCase
2480+ def thread_encrypting_and_decrypting ( thread_label )
2481+ posts = 100 . times . collect { |index | EncryptedPost . create! title : "Article #{ index } (#{ thread_label } )" , body : "Body #{ index } (#{ thread_label } )" }
2482+
2483+ Thread . new do
2484+ posts . each . with_index do |article , index |
2485+ assert_encrypted_attribute article , :title , "Article #{ index } (#{ thread_label } )"
2486+ article . decrypt
2487+ assert_not_encrypted_attribute article , :title , "Article #{ index } (#{ thread_label } )"
2488+ end
2489+ end
2490+ end
2491+ end
You can’t perform that action at this time.
0 commit comments