(t *testing.T)
| 284 | } |
| 285 | |
| 286 | func TestMarkInstalled(t *testing.T) { |
| 287 | ctx := context.Background() |
| 288 | s := NewStore(filepath.Join(t.TempDir(), "cam.db")) |
| 289 | s.Init(ctx) |
| 290 | s.UpsertItem(ctx, Item{Kind: "skill", Name: "x", InstallKey: "a/b:x"}) |
| 291 | |
| 292 | if err := s.MarkInstalled(ctx, "skill", "a/b:x", "claude"); err != nil { |
| 293 | t.Fatalf("MarkInstalled: %v", err) |
| 294 | } |
| 295 | item, _ := s.GetItem(ctx, "skill", "a/b:x") |
| 296 | if !item.Installed { |
| 297 | t.Fatal("expected installed=true") |
| 298 | } |
| 299 | if item.InstalledTargets != "claude" { |
| 300 | t.Fatalf("unexpected targets: %s", item.InstalledTargets) |
| 301 | } |
| 302 | } |
| 303 | |
| 304 | func TestInitMigratesPromptToInstructionIdempotent(t *testing.T) { |
| 305 | ctx := context.Background() |
nothing calls this directly
no test coverage detected