1
0
Fork 0
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:
Ryuta Kamizono 2021-04-17 13:10:01 +09:00 committed by GitHub
commit 9a263e9a0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -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)
if EncryptedAuthor.columns_hash["name"].limit
# No column limits in SQLLite
# No column limits in SQLite
test "validate column sizes" do
assert EncryptedAuthor.new(name: "jorge").valid?
assert_not EncryptedAuthor.new(name: "a" * 256).valid?

View file

@ -4,6 +4,8 @@ require "cases/encryption/helper"
require "models/book_encrypted"
class ActiveRecord::Encryption::EncryptableFixtureTest < ActiveRecord::EncryptionTestCase
self.use_transactional_tests = false
fixtures :encrypted_books, :encrypted_book_that_ignores_cases
test "fixtures get encrypted automatically" do