(t *testing.T)
| 61 | } |
| 62 | |
| 63 | func TestScreenInbound_Benign(t *testing.T) { |
| 64 | srv := testScreenServer() |
| 65 | body := "Subject: lunch\r\n\r\nHi, are we still on for lunch tomorrow at noon?" |
| 66 | res := srv.screenInbound(context.Background(), scanOnAgent(), "msg_2", "friend@acme.com", |
| 67 | []byte(body), nil, inboundpolicy.Decision{}) |
| 68 | if res.Detected { |
| 69 | t.Errorf("benign message flagged as injection: %+v", res) |
| 70 | } |
| 71 | if len(res.Events) != 0 { |
| 72 | t.Errorf("benign message produced events: %+v", res.Events) |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | func TestScreenInbound_ScanOffSkips(t *testing.T) { |
| 77 | srv := testScreenServer() |
nothing calls this directly
no test coverage detected