Revert "#66 検索時のフォロー中アカウント一覧作成処理を改善"

This reverts commit 22d1f52597.
This commit is contained in:
KMY 2023-10-07 21:33:52 +09:00
parent 9738d80cb4
commit 87afb5295a
7 changed files with 5 additions and 90 deletions

View file

@ -571,34 +571,5 @@ RSpec.describe Status do
status.reload
expect(status.uri).to start_with('https://')
end
it 'saves as searchable by followers' do
status = described_class.create(account: alice, text: 'foo', searchability: :public)
expect(status.account.account_stat.searchable_by_follower).to be true
end
end
describe 'after destroy' do
it 'saves as not searchable by followers' do
status = described_class.create(account: alice, text: 'foo', searchability: :public)
status.destroy
expect(status.account.account_stat.searchable_by_follower).to be false
end
it 'on multiple posts' do
status1 = described_class.create(account: alice, text: 'foo', searchability: :public)
status2 = described_class.create(account: alice, text: 'foo', searchability: :public)
status3 = described_class.create(account: alice, text: 'foo', searchability: :public)
status4 = described_class.create(account: alice, text: 'foo', searchability: :public)
status5 = described_class.create(account: alice, text: 'foo', searchability: :public)
status1.destroy
status2.destroy
status3.destroy
expect(alice.account_stat.searchable_by_follower).to be true
status4.destroy
expect(alice.account_stat.searchable_by_follower).to be true
status5.destroy
expect(alice.account_stat.searchable_by_follower).to be false
end
end
end