mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Fix SMTP bounce regexp (#16019)
Never trust me with regexp. Follow up to
01ef1d08fc,
which did not take into account codes in
the format X.X.XX (with the 2 digits on the end)
This commit is contained in:
@@ -168,6 +168,8 @@ describe EmailLog do
|
||||
it "makes sure the bounce_error_code is in the format X.X.X or XXX" do
|
||||
email_log.update!(bounce_error_code: "5.1.1")
|
||||
expect(email_log.reload.bounce_error_code).to eq("5.1.1")
|
||||
email_log.update!(bounce_error_code: "5.2.23")
|
||||
expect(email_log.reload.bounce_error_code).to eq("5.2.23")
|
||||
email_log.update!(bounce_error_code: "5.0.0 (permanent failure)")
|
||||
expect(email_log.reload.bounce_error_code).to eq("5.0.0")
|
||||
email_log.update!(bounce_error_code: "422")
|
||||
|
||||
Reference in New Issue
Block a user