(t *testing.T)
| 225 | } |
| 226 | |
| 227 | func TestNotifierNilSafe(t *testing.T) { |
| 228 | var n *hitlnotify.Notifier |
| 229 | // Both sync and async paths must tolerate a nil receiver so wiring |
| 230 | // can omit the notifier in tests / partial deployments without |
| 231 | // having to guard every call site. |
| 232 | if err := n.NotifyPendingApproval(context.Background(), nil, nil); err != nil { |
| 233 | t.Errorf("nil receiver sync: err = %v, want nil", err) |
| 234 | } |
| 235 | n.NotifyPendingApprovalAsync(nil, nil) // must not panic |
| 236 | } |
| 237 | |
| 238 | // extractToken pulls the ?t=... token out of the first occurrence of the |
| 239 | // given URL prefix in the raw email data. Tolerates URL encoding since |
nothing calls this directly
no test coverage detected