Fix `/admin/accounts/:account_id/statuses/:id` for edited posts with media attachments (#30819)

tests/flaky-tests-performance-logs
Claire 6 months ago committed by GitHub
parent 61722b1b1f
commit 8827cd597e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -42,7 +42,7 @@ class StatusEdit < ApplicationRecord
scope :ordered, -> { order(id: :asc) }
delegate :local?, :application, :edited?, :edited_at,
:discarded?, :visibility, to: :status
:discarded?, :visibility, :language, to: :status
def emojis
return @emojis if defined?(@emojis)

@ -44,6 +44,11 @@ describe Admin::StatusesController do
describe 'GET #show' do
before do
status.media_attachments << Fabricate(:media_attachment, type: :image, account: status.account)
status.save!
status.snapshot!(at_time: status.created_at, rate_limit: false)
status.update!(text: 'Hello, this is an edited post')
status.snapshot!(rate_limit: false)
get :show, params: { account_id: account.id, id: status.id }
end

Loading…
Cancel
Save