(t *testing.T)
| 103 | } |
| 104 | |
| 105 | func TestSubscribeEmptyPaths(t *testing.T) { |
| 106 | t.Parallel() |
| 107 | |
| 108 | logger := slogtest.Make(t, nil) |
| 109 | h := agentgit.NewHandler(logger) |
| 110 | |
| 111 | added := h.Subscribe([]string{}) |
| 112 | require.False(t, added, "empty slice should not add any repos") |
| 113 | |
| 114 | added = h.Subscribe(nil) |
| 115 | require.False(t, added, "nil slice should not add any repos") |
| 116 | |
| 117 | ctx := context.Background() |
| 118 | msg := h.Scan(ctx) |
| 119 | require.Nil(t, msg, "scan should return nil with no repos") |
| 120 | } |
| 121 | |
| 122 | func TestScanReturnsRepoChanges(t *testing.T) { |
| 123 | t.Parallel() |
nothing calls this directly
no test coverage detected