fakeInboundLookup is a stub that satisfies hitlInboundLookup so we can drive attachReferencesChain without a live Postgres. Each test sets up the fields it cares about; everything else is zero-valued.
| 14 | // drive attachReferencesChain without a live Postgres. Each test sets up |
| 15 | // the fields it cares about; everything else is zero-valued. |
| 16 | type fakeInboundLookup struct { |
| 17 | calledWith struct { |
| 18 | agentID string |
| 19 | emailMessageID string |
| 20 | } |
| 21 | wantAgentID string // when non-empty, t.Errorf if a different agent is queried |
| 22 | returnInbound *identity.Message |
| 23 | returnErr error |
| 24 | } |
| 25 | |
| 26 | func (f *fakeInboundLookup) GetInboundByEmailMessageID(_ context.Context, agentID, emailMessageID string) (*identity.Message, error) { |
| 27 | f.calledWith.agentID = agentID |
nothing calls this directly
no outgoing calls
no test coverage detected