feat: restore credit limits and harden SMS sending
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user