(t *testing.T)
| 179 | } |
| 180 | |
| 181 | func TestScreenInbound_GateFlagDelivers(t *testing.T) { |
| 182 | srv := testScreenServer() |
| 183 | agent := scanOnAgent() |
| 184 | agent.InboundScan = identity.ScanOff |
| 185 | agent.InboundPolicyAction = "flag" // default → deliver, never hold |
| 186 | res := srv.screenInbound(context.Background(), agent, "msg_h4", "stranger@x.com", |
| 187 | []byte("Subject: hi\r\n\r\nhi"), nil, |
| 188 | inboundpolicy.Decision{Flagged: true, Reason: "sender not on allowlist"}) |
| 189 | |
| 190 | if res.Hold { |
| 191 | t.Errorf("gate flag must not hold") |
| 192 | } |
| 193 | if res.Denorm.Status != "" { |
| 194 | t.Errorf("delivered message must have empty review status, got %q", res.Denorm.Status) |
| 195 | } |
| 196 | } |
nothing calls this directly
no test coverage detected