Refactor User and spec (#3431)
* Protect send_devise_notification of User * Improve spec for User
This commit is contained in:
committed by
Eugen Rochko
parent
e031fd60ad
commit
7db98aa70e
@ -68,10 +68,6 @@ class User < ApplicationRecord
|
||||
save!
|
||||
end
|
||||
|
||||
def send_devise_notification(notification, *args)
|
||||
devise_mailer.send(notification, self, *args).deliver_later
|
||||
end
|
||||
|
||||
def setting_default_privacy
|
||||
settings.default_privacy || (account.locked? ? 'private' : 'public')
|
||||
end
|
||||
@ -88,6 +84,12 @@ class User < ApplicationRecord
|
||||
settings.auto_play_gif
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def send_devise_notification(notification, *args)
|
||||
devise_mailer.send(notification, self, *args).deliver_later
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def sanitize_languages
|
||||
|
Reference in New Issue
Block a user