diff options
Diffstat (limited to 'spec/models/account_spec.rb')
-rw-r--r-- | spec/models/account_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/models/account_spec.rb b/spec/models/account_spec.rb index 3edbc3253..157db633a 100644 --- a/spec/models/account_spec.rb +++ b/spec/models/account_spec.rb @@ -190,6 +190,21 @@ RSpec.describe Account, type: :model do end end + describe '#excluded_from_timeline_account_ids' do + it 'includes account ids of blockings, blocked_bys and mutes' do + account = Fabricate(:account) + block = Fabricate(:block, account: account) + mute = Fabricate(:mute, account: account) + block_by = Fabricate(:block, target_account: account) + + results = account.excluded_from_timeline_account_ids + expect(results.size).to eq 3 + expect(results).to include(block.target_account.id) + expect(results).to include(mute.target_account.id) + expect(results).to include(block_by.account.id) + end + end + describe '.search_for' do before do @match = Fabricate( |