(t *testing.T)
| 32 | } |
| 33 | |
| 34 | func TestPathStore_AddPaths_SkipsNilUUIDs(t *testing.T) { |
| 35 | t.Parallel() |
| 36 | |
| 37 | ps := agentgit.NewPathStore() |
| 38 | |
| 39 | // A nil chatID should be a no-op. |
| 40 | ps.AddPaths([]uuid.UUID{uuid.Nil}, []string{"/x"}) |
| 41 | require.Nil(t, ps.GetPaths(uuid.Nil)) |
| 42 | |
| 43 | // A nil ancestor should be silently skipped. |
| 44 | chatID := uuid.New() |
| 45 | ps.AddPaths([]uuid.UUID{chatID, uuid.Nil}, []string{"/y"}) |
| 46 | require.Equal(t, []string{"/y"}, ps.GetPaths(chatID)) |
| 47 | require.Nil(t, ps.GetPaths(uuid.Nil)) |
| 48 | } |
| 49 | |
| 50 | func TestPathStore_GetPaths_DeduplicatedSorted(t *testing.T) { |
| 51 | t.Parallel() |
nothing calls this directly
no test coverage detected