Add: 検索許可「ローカルとフォロワー」 (#60)

This commit is contained in:
KMY(雪あすか) 2023-10-05 16:37:27 +09:00 committed by GitHub
parent deb8642e95
commit 235bef36d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 210 additions and 25 deletions

View file

@ -137,6 +137,15 @@ RSpec.describe Status do
end
end
context 'when public-public_unlisted but silenced' do
let(:silenced_at) { Time.now.utc }
let(:status_searchability) { :public_unlisted }
it 'returns private' do
expect(subject.compute_searchability).to eq 'private'
end
end
context 'when public-private' do
let(:status_searchability) { :private }
@ -215,6 +224,24 @@ RSpec.describe Status do
expect(subject.compute_searchability).to eq 'public'
end
end
context 'when public-public_unlisted of local account' do
let(:account_searchability) { :public }
let(:account_domain) { nil }
let(:status_searchability) { :public_unlisted }
it 'returns public' do
expect(subject.compute_searchability).to eq 'public'
end
it 'returns public_unlisted for local' do
expect(subject.compute_searchability_local).to eq 'public_unlisted'
end
it 'returns private for activitypub' do
expect(subject.compute_searchability_activitypub).to eq 'private'
end
end
end
describe '#quote' do