0
0
Fork 0

Add Account#actor_type_application? query method (#33525)

This commit is contained in:
Matt Jankowski 2025-01-09 09:32:48 -05:00 committed by GitHub
parent a8b2b474d7
commit 9b8d1fb6d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 21 additions and 3 deletions

View file

@ -80,6 +80,20 @@ RSpec.describe Account do
end
end
describe '#actor_type_application?' do
context 'when the actor is not of type application' do
subject { Fabricate.build :account, actor_type: 'Person' }
it { is_expected.to_not be_actor_type_application }
end
context 'when the actor is of type application' do
subject { Fabricate.build :account, actor_type: 'Application' }
it { is_expected.to be_actor_type_application }
end
end
describe 'Local domain user methods' do
subject { Fabricate(:account, domain: nil, username: 'alice') }