Fix: #636 投稿削除時エラーが出る場合がある問題 (#637)

This commit is contained in:
KMY(雪あすか) 2024-03-05 20:17:47 +09:00 committed by GitHub
parent 8cb4838fb1
commit 82a8026ba2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 3 deletions

View file

@ -83,6 +83,18 @@ RSpec.describe RemoveStatusService, :sidekiq_inline, type: :service do
end
end
context 'when removed status is null-searchability' do
let(:status) { PostStatusService.new.call(alice, visibility: 'unlisted', text: 'Public post') }
before do
status.update!(searchability: nil)
end
it 'does not throw error' do
expect { subject.call(status) }.to_not raise_error
end
end
context 'when removed status is limited' do
let(:status) { PostStatusService.new.call(alice, visibility: 'mutual', text: 'limited post') }