mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-08 22:37:57 -05:00
Removed deprecations warning output for Devise::Models::Authenticatable::BLACKLIST_FOR_SERIALIZATION
This commit is contained in:
committed by
Rafael Mendonça França
parent
fc731a88bb
commit
e524a3d22d
@@ -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
|
||||
|
||||
|
||||
@@ -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 ||= []
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user