(t *testing.T)
| 269 | } |
| 270 | |
| 271 | func TestGetItem(t *testing.T) { |
| 272 | ctx := context.Background() |
| 273 | s := NewStore(filepath.Join(t.TempDir(), "cam.db")) |
| 274 | s.Init(ctx) |
| 275 | s.UpsertItem(ctx, Item{Kind: "skill", Name: "test-skill", InstallKey: "a/b:test-skill"}) |
| 276 | |
| 277 | item, err := s.GetItem(ctx, "skill", "a/b:test-skill") |
| 278 | if err != nil { |
| 279 | t.Fatalf("GetItem: %v", err) |
| 280 | } |
| 281 | if item.Name != "test-skill" { |
| 282 | t.Fatalf("unexpected name: %s", item.Name) |
| 283 | } |
| 284 | } |
| 285 | |
| 286 | func TestMarkInstalled(t *testing.T) { |
| 287 | ctx := context.Background() |
nothing calls this directly
no test coverage detected