Update Mailgun test to validate delivery time format with timezone offset
- Modified the test for scheduled email delivery to assert that the delivery time includes a timezone offset in the RFC1123Z format. - Replaced the previous check for "GMT" with a regex assertion to ensure compliance with the expected format.
This commit is contained in:
parent
ae8efd247a
commit
fecbc87ba8
1 changed files with 2 additions and 1 deletions
|
|
@ -436,7 +436,8 @@ func TestSend_WithScheduledTime(t *testing.T) {
|
|||
// Verify scheduled time is set
|
||||
deliveryTime := r.FormValue("o:deliverytime")
|
||||
assert.NotEmpty(t, deliveryTime)
|
||||
assert.Contains(t, deliveryTime, "GMT") // RFC1123Z format includes GMT
|
||||
// RFC1123Z format includes timezone offset (e.g., "+0000", "+0800")
|
||||
assert.Regexp(t, `[+-]\d{4}`, deliveryTime)
|
||||
|
||||
w.WriteHeader(http.StatusOK)
|
||||
json.NewEncoder(w).Encode(map[string]interface{}{"message": "Queued"})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue