MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / TestNotifierNilSafe

Function TestNotifierNilSafe

internal/hitlnotify/notifier_test.go:227–236  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

225}
226
227func 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

Callers

nothing calls this directly

Calls 2

NotifyPendingApprovalMethod · 0.95

Tested by

no test coverage detected