mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #42001 from ricardotk002/fix-encrypted-fixtures-test
Fix test `EncryptableFixtureTest` that fails intermittently
This commit is contained in:
commit
9a263e9a0f
2 changed files with 3 additions and 1 deletions
|
@ -242,7 +242,7 @@ class ActiveRecord::Encryption::EncryptableRecordTest < ActiveRecord::Encryption
|
||||||
|
|
||||||
# Only run for adapters that add a default string limit when not provided (MySQL, 255)
|
# Only run for adapters that add a default string limit when not provided (MySQL, 255)
|
||||||
if EncryptedAuthor.columns_hash["name"].limit
|
if EncryptedAuthor.columns_hash["name"].limit
|
||||||
# No column limits in SQLLite
|
# No column limits in SQLite
|
||||||
test "validate column sizes" do
|
test "validate column sizes" do
|
||||||
assert EncryptedAuthor.new(name: "jorge").valid?
|
assert EncryptedAuthor.new(name: "jorge").valid?
|
||||||
assert_not EncryptedAuthor.new(name: "a" * 256).valid?
|
assert_not EncryptedAuthor.new(name: "a" * 256).valid?
|
||||||
|
|
|
@ -4,6 +4,8 @@ require "cases/encryption/helper"
|
||||||
require "models/book_encrypted"
|
require "models/book_encrypted"
|
||||||
|
|
||||||
class ActiveRecord::Encryption::EncryptableFixtureTest < ActiveRecord::EncryptionTestCase
|
class ActiveRecord::Encryption::EncryptableFixtureTest < ActiveRecord::EncryptionTestCase
|
||||||
|
self.use_transactional_tests = false
|
||||||
|
|
||||||
fixtures :encrypted_books, :encrypted_book_that_ignores_cases
|
fixtures :encrypted_books, :encrypted_book_that_ignores_cases
|
||||||
|
|
||||||
test "fixtures get encrypted automatically" do
|
test "fixtures get encrypted automatically" do
|
||||||
|
|
Loading…
Reference in a new issue