Merge commit 'a3aeae02885408381c7c1f3f6a0cc88799823409' into glitch-soc/merge-upstream

This commit is contained in:
Claire committed 2026-03-03 18:12:16 +01:00
commit 45b87f31ff
39 files changed
+569 -259

No files matched your search

+10
View File
@@ -516,6 +516,7 @@ RSpec.describe '/api/v1/statuses' do
let(:scopes) { 'write:statuses' }
let(:status) { Fabricate(:status, account: user.account) }
let!(:media) { Fabricate(:media_attachment, status: status) }
it_behaves_like 'forbidden for wrong scope', 'read read:statuses'
@@ -525,6 +526,15 @@ RSpec.describe '/api/v1/statuses' do
expect(response).to have_http_status(200)
expect(response.content_type)
.to start_with('application/json')
expect(response.parsed_body).to include(
id: status.id.to_s,
media_attachments: contain_exactly(
a_hash_including(
id: media.id.to_s,
url: %r{/system/media_attachments/files/}
)
)
)
expect(Status.find_by(id: status.id)).to be_nil
expect(RemovalWorker).to have_enqueued_sidekiq_job(status.id, { 'redraft' => true })
end