Aggiunge sulla dashboard invii il KPI mail/ora dagli invii SMTP confermati.
CI / scan_js (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / scan_ruby (push) Has been cancelled

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-07 12:43:39 +02:00
co-authored by Cursor
parent 3c8bfe053f
commit 390cb0e657
5 changed files with 132 additions and 1 deletions
@@ -16,6 +16,26 @@ class MailingsControllerTest < ActionDispatch::IntegrationTest
assert_match(/Invii email/, response.body)
end
test "dashboard shows hourly send throughput" do
login_as users(:admin)
follow_redirect! if response.redirect?
mailing = create_mailing(identity: @identity, audience: "to_send")
org = organizations(:acme)
mailing.mailing_recipients.create!(
organization: org,
contact: org.contacts.first,
email: org.email,
status: "sent",
sent_at: 8.minutes.ago
)
get dashboard_mailings_path(project_code: @project.code)
assert_response :success
assert_select "div", text: "Mail / ora"
assert_match(/1 ultimi 15 min/, response.body)
end
test "creates a draft and opens audience filters" do
login_as users(:admin)
follow_redirect! if response.redirect?