Removed deprecations warning output for Devise::Models::Authenticatable::BLACKLIST_FOR_SERIALIZATION

This commit is contained in:
soartec-lab
2023-05-26 16:43:47 +09:00
committed by Rafael Mendonça França
parent fc731a88bb
commit e524a3d22d
3 changed files with 2 additions and 10 deletions

View File

@@ -1,6 +1,7 @@
### Unreleased
* enhancements
* Removed deprecations warning output for `Devise::Models::Authenticatable::BLACKLIST_FOR_SERIALIZATION` (@soartec-lab)
### 4.9.2 - 2023-04-03

View File

@@ -61,9 +61,6 @@ module Devise
:last_sign_in_ip, :password_salt, :confirmation_token, :confirmed_at, :confirmation_sent_at,
:remember_token, :unconfirmed_email, :failed_attempts, :unlock_token, :locked_at]
include Devise::DeprecatedConstantAccessor
deprecate_constant "BLACKLIST_FOR_SERIALIZATION", "Devise::Models::Authenticatable::UNSAFE_ATTRIBUTES_FOR_SERIALIZATION", deprecator: Devise.deprecator
included do
class_attribute :devise_modules, instance_writer: false
self.devise_modules ||= []

View File

@@ -31,12 +31,6 @@ class SerializableTest < ActiveSupport::TestCase
assert_key "username", @user.as_json({ only: :username, except: [:email].freeze }.freeze)["user"]
end
test 'constant `BLACKLIST_FOR_SERIALIZATION` is deprecated' do
assert_deprecated("Devise::Models::Authenticatable::UNSAFE_ATTRIBUTES_FOR_SERIALIZATION", Devise.deprecator) do
Devise::Models::Authenticatable::BLACKLIST_FOR_SERIALIZATION
end
end
def assert_key(key, subject)
assert subject.key?(key), "Expected #{subject.inspect} to have key #{key.inspect}"
end