mirror of
https://github.com/kikobar/mastodon.git
synced 2024-11-16 12:12:14 +00:00
Fix /admin/accounts/:account_id/statuses/:id
for edited posts with media attachments (#30819)
This commit is contained in:
parent
55408f8085
commit
fcae9435ec
|
@ -42,7 +42,7 @@ class StatusEdit < ApplicationRecord
|
||||||
default_scope { order(id: :asc) }
|
default_scope { order(id: :asc) }
|
||||||
|
|
||||||
delegate :local?, :application, :edited?, :edited_at,
|
delegate :local?, :application, :edited?, :edited_at,
|
||||||
:discarded?, :visibility, to: :status
|
:discarded?, :visibility, :language, to: :status
|
||||||
|
|
||||||
def emojis
|
def emojis
|
||||||
return @emojis if defined?(@emojis)
|
return @emojis if defined?(@emojis)
|
||||||
|
|
|
@ -43,6 +43,11 @@ describe Admin::StatusesController do
|
||||||
|
|
||||||
describe 'GET #show' do
|
describe 'GET #show' do
|
||||||
before 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 }
|
get :show, params: { account_id: account.id, id: status.id }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue