Fix moderation warning e-mails that include posts (#36462)
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
%table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
|
%table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
|
||||||
%tr
|
%tr
|
||||||
%td.email-status-content
|
%td.email-status-content
|
||||||
= render 'status_content', status: status
|
= render 'notification_mailer/status_content', status: status
|
||||||
|
|
||||||
%p.email-status-footer
|
%p.email-status-footer
|
||||||
= link_to l(status.created_at.in_time_zone(time_zone.presence), format: :with_time_zone), web_url("@#{status.account.pretty_acct}/#{status.id}")
|
= link_to l(status.created_at.in_time_zone(time_zone.presence), format: :with_time_zone), web_url("@#{status.account.pretty_acct}/#{status.id}")
|
||||||
|
|||||||
@@ -11,12 +11,12 @@
|
|||||||
%table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
|
%table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
|
||||||
%tr
|
%tr
|
||||||
%td.email-status-content
|
%td.email-status-content
|
||||||
= render 'status_content', status: status
|
= render 'notification_mailer/status_content', status: status
|
||||||
|
|
||||||
- if status.local? && status.quote
|
- if status.local? && status.quote
|
||||||
%table.email-inner-card-table{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
|
%table.email-inner-card-table{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
|
||||||
%tr
|
%tr
|
||||||
%td.email-inner-nested-card-td
|
%td.email-inner-nested-card-td
|
||||||
= render 'nested_quote', status: status.quote.quoted_status, time_zone: time_zone
|
= render 'notification_mailer/nested_quote', status: status.quote.quoted_status, time_zone: time_zone
|
||||||
%p.email-status-footer
|
%p.email-status-footer
|
||||||
= link_to l(status.created_at.in_time_zone(time_zone.presence), format: :with_time_zone), web_url("@#{status.account.pretty_acct}/#{status.id}")
|
= link_to l(status.created_at.in_time_zone(time_zone.presence), format: :with_time_zone), web_url("@#{status.account.pretty_acct}/#{status.id}")
|
||||||
|
|||||||
@@ -141,7 +141,9 @@ RSpec.describe UserMailer do
|
|||||||
end
|
end
|
||||||
|
|
||||||
describe '#warning' do
|
describe '#warning' do
|
||||||
let(:strike) { Fabricate(:account_warning, target_account: receiver.account, text: 'dont worry its just the testsuite', action: 'suspend') }
|
let(:status) { Fabricate(:status, account: receiver.account) }
|
||||||
|
let(:quote) { Fabricate(:quote, state: :accepted, status: status) }
|
||||||
|
let(:strike) { Fabricate(:account_warning, target_account: receiver.account, text: 'dont worry its just the testsuite', action: 'suspend', status_ids: [quote.status_id]) }
|
||||||
let(:mail) { described_class.warning(receiver, strike) }
|
let(:mail) { described_class.warning(receiver, strike) }
|
||||||
|
|
||||||
it 'renders warning notification' do
|
it 'renders warning notification' do
|
||||||
|
|||||||
Reference in New Issue
Block a user