Evita 500 senza SMTP e chiude gli incidenti overflow stale.

Reset password e mail replay usano deliver_mail; il health check overflow risolve tutte le fingerprint del kind, non solo quella sana.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-31 08:55:36 +02:00
co-authored by Cursor
parent b08049cf69
commit 645807b853
9 changed files with 104 additions and 3 deletions
+11
View File
@@ -109,6 +109,17 @@ RSpec.describe "Account API", type: :request do
expect(user.reload.password_reset_digest).to be_present
end
it "non va in 500 se in produzione manca SMTP" do
allow(MatchLiveTv).to receive(:smtp_configured?).and_return(false)
allow(Rails).to receive(:env).and_return(ActiveSupport::StringInquirer.new("production"))
expect {
post "/api/v1/auth/password/forgot", params: { email: user.email }
}.not_to change { ActionMailer::Base.deliveries.size }
expect(response).to have_http_status(:ok)
expect(user.reload.password_reset_digest).to be_present
end
it "returns the same message for unknown emails" do
expect {
post "/api/v1/auth/password/forgot", params: { email: "nobody@example.com" }