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

Function TestWriteOutboxRow_RejectsEmptyID

internal/webhookpub/outbox_test.go:83–95  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

81}
82
83func TestWriteOutboxRow_RejectsEmptyID(t *testing.T) {
84 fe := &fakeExec{}
85 err := writeOutboxRow(context.Background(), fe, Event{UserID: "u1", Type: "email.received"})
86 if err == nil {
87 t.Fatalf("expected error on empty ID")
88 }
89 if !strings.Contains(err.Error(), "non-empty ID") {
90 t.Errorf("error should mention ID: %v", err)
91 }
92 if len(fe.calls) != 0 {
93 t.Errorf("Exec should not be called: %v", fe.calls)
94 }
95}
96
97func TestWriteOutboxRow_RejectsEmptyUserID(t *testing.T) {
98 fe := &fakeExec{}

Callers

nothing calls this directly

Calls 2

writeOutboxRowFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected