feat: restore credit limits and harden SMS sending

This commit is contained in:
hectorzhao
2026-07-14 18:46:35 +08:00
parent 3e3b7a9d1a
commit c1a17699db
23 changed files with 796 additions and 56 deletions
+11
View File
@@ -86,3 +86,14 @@ func TestHandleCMPP2DeliverReceiptPostsReceiptEvent(t *testing.T) {
t.Fatal("timed out waiting for receipt event")
}
}
func TestReceiptStatusTreatsNonDeliveredFinalStatesAsUndelivered(t *testing.T) {
for _, stat := range []string{"UNKNOWN", "UNDELIV", "EXPIRED", "DELETED", "REJECTD"} {
if got := receiptStatus(stat); got != "undelivered" {
t.Fatalf("receiptStatus(%q) = %q, want undelivered", stat, got)
}
}
if got := receiptStatus(""); got != "unknown" {
t.Fatalf("receiptStatus(empty) = %q, want unknown", got)
}
}