(t *testing.T)
| 81 | } |
| 82 | |
| 83 | func 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 | |
| 97 | func TestWriteOutboxRow_RejectsEmptyUserID(t *testing.T) { |
| 98 | fe := &fakeExec{} |
nothing calls this directly
no test coverage detected