Change: #844 searchableByに意図しない値が入っていたときの挙動 (#862)

This commit is contained in:
KMY(雪あすか) 2024-10-02 08:22:30 +09:00 committed by GitHub
parent 7a6ec3603e
commit 294acdfd94
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 29 additions and 26 deletions

View file

@ -653,6 +653,17 @@ RSpec.describe ActivityPub::Activity::Create do
end
end
context 'with unintended value' do
let(:searchable_by) { 'ohagi' }
it 'create status' do
status = sender.statuses.first
expect(status).to_not be_nil
expect(status.searchability).to eq 'limited'
end
end
context 'with direct when not specify' do
let(:searchable_by) { nil }
@ -675,17 +686,6 @@ RSpec.describe ActivityPub::Activity::Create do
end
end
context 'with limited old spec' do
let(:searchable_by) { 'as:Limited' }
it 'create status' do
status = sender.statuses.first
expect(status).to_not be_nil
expect(status.searchability).to eq 'limited'
end
end
context 'with bio' do
let(:searchable_by) { nil }