Add Account#actor_type_application?
query method (#33525)
This commit is contained in:
parent
a8b2b474d7
commit
9b8d1fb6d1
2 changed files with 21 additions and 3 deletions
|
@ -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') }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue