From a6788662b09164cfbaf1cebe6c8abc5123452285 Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Sun, 30 Apr 2017 21:49:24 +0900 Subject: Revert "Use PostgreSQL inheritance for blocks and mutes (#2520)" (#2634) This reverts commit 5135d609b774b177d3d3894b176a822d86b73d3c. --- spec/lib/atom_serializer_spec.rb | 4 ++-- spec/models/account_spec.rb | 6 +++--- spec/models/status_spec.rb | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'spec') diff --git a/spec/lib/atom_serializer_spec.rb b/spec/lib/atom_serializer_spec.rb index 345285a7a..cfca82a28 100644 --- a/spec/lib/atom_serializer_spec.rb +++ b/spec/lib/atom_serializer_spec.rb @@ -152,7 +152,7 @@ RSpec.describe AtomSerializer do describe '#block_salmon' do let(:xml) do - block = Fabricate(:block, account: author, target_account: receiver, block: true) + block = Fabricate(:block, account: author, target_account: receiver) xml = AtomSerializer.render(AtomSerializer.new.block_salmon(block)) block.destroy xml @@ -171,7 +171,7 @@ RSpec.describe AtomSerializer do describe '#unblock_salmon' do let(:xml) do - block = Fabricate(:block, account: author, target_account: receiver, block: true) + block = Fabricate(:block, account: author, target_account: receiver) block.destroy xml = AtomSerializer.render(AtomSerializer.new.unblock_salmon(block)) author.block!(receiver) diff --git a/spec/models/account_spec.rb b/spec/models/account_spec.rb index b4481aaed..157db633a 100644 --- a/spec/models/account_spec.rb +++ b/spec/models/account_spec.rb @@ -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, block: true) - mute = Fabricate(:mute, account: account, block: false) - block_by = Fabricate(:block, target_account: account, block: true) + 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 diff --git a/spec/models/status_spec.rb b/spec/models/status_spec.rb index 956b9b882..c553b052e 100644 --- a/spec/models/status_spec.rb +++ b/spec/models/status_spec.rb @@ -226,7 +226,7 @@ RSpec.describe Status, type: :model do it 'excludes statuses from accounts blocked by the account' do blocked = Fabricate(:account) - Fabricate(:block, account: @account, target_account: blocked, block: true) + Fabricate(:block, account: @account, target_account: blocked) blocked_status = Fabricate(:status, account: blocked) results = Status.as_public_timeline(@account) @@ -235,7 +235,7 @@ RSpec.describe Status, type: :model do it 'excludes statuses from accounts who have blocked the account' do blocked = Fabricate(:account) - Fabricate(:block, account: blocked, target_account: @account, block: true) + Fabricate(:block, account: blocked, target_account: @account) blocked_status = Fabricate(:status, account: blocked) results = Status.as_public_timeline(@account) @@ -244,7 +244,7 @@ RSpec.describe Status, type: :model do it 'excludes statuses from accounts muted by the account' do muted = Fabricate(:account) - Fabricate(:mute, account: @account, target_account: muted, block: false) + Fabricate(:mute, account: @account, target_account: muted) muted_status = Fabricate(:status, account: muted) results = Status.as_public_timeline(@account) -- cgit