Use PostgreSQL inheritance for blocks and mutes (#2520)
This commit is contained in:
parent
f48cb3eb17
commit
5135d609b7
7 changed files with 43 additions and 12 deletions
|
@ -193,9 +193,9 @@ RSpec.describe Account, type: :model do
|
|||
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)
|
||||
block = Fabricate(:block, account: account, block: true)
|
||||
mute = Fabricate(:mute, account: account, block: false)
|
||||
block_by = Fabricate(:block, target_account: account, block: true)
|
||||
|
||||
results = account.excluded_from_timeline_account_ids
|
||||
expect(results.size).to eq 3
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue