Fix quotes with CWs but no text not having fallback link (#37361)

This commit is contained in:
Claire authored and GitHub committed 2026-01-05 10:35:35 +00:00
1 parent 1fe737e0bd
commit f711e222dc
3 files changed
+22 -3

No files matched your search

@@ -19,6 +19,25 @@ RSpec.describe REST::StatusSerializer do
let(:bob) { Fabricate(:account, username: 'bob', domain: 'other.com') }
let(:status) { Fabricate(:status, account: alice) }
context 'with a local status' do
context 'with a quote and a CW but no contents' do
let(:quoted_status) { Fabricate(:status, account: alice) }
let(:status) { Fabricate.build(:status, account: alice, text: '', spoiler_text: 'this is a CW') }
before do
Fabricate(:quote, status: status, quoted_status: quoted_status, state: :accepted)
end
it 'renders the status with a CW and fallback link' do
expect(subject)
.to include(
'content' => /RE: <a/,
'spoiler_text' => 'this is a CW'
)
end
end
end
context 'with a remote status' do
let(:status) { Fabricate(:status, account: bob) }