Add coverage for AccountPin
model (#33231)
This commit is contained in:
parent
58c5068bda
commit
7d52b24569
2 changed files with 34 additions and 1 deletions
|
@ -23,6 +23,6 @@ class AccountPin < ApplicationRecord
|
|||
private
|
||||
|
||||
def validate_follow_relationship
|
||||
errors.add(:base, I18n.t('accounts.pin_errors.following')) unless account.following?(target_account)
|
||||
errors.add(:base, I18n.t('accounts.pin_errors.following')) unless account&.following?(target_account)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue