test(onboard): verify TOOLS.md is included in workspace templates

Add test to confirm TOOLS.md is embedded and copied during onboarding,
matching the existing AGENTS.md test pattern.
This commit is contained in:
MahendraTeja95 2026-03-11 16:40:35 +05:30
parent c790921b76
commit 2c9681f317

View file

@ -23,3 +23,20 @@ func TestCopyEmbeddedToTargetUsesAgentsMarkdown(t *testing.T) {
t.Fatalf("expected legacy file %s to be absent, got err=%v", legacyPath, err) t.Fatalf("expected legacy file %s to be absent, got err=%v", legacyPath, err)
} }
} }
func TestCopyEmbeddedToTargetIncludesToolsMarkdown(t *testing.T) {
targetDir := t.TempDir()
if err := copyEmbeddedToTarget(targetDir); err != nil {
t.Fatalf("copyEmbeddedToTarget() error = %v", err)
}
toolsPath := filepath.Join(targetDir, "TOOLS.md")
data, err := os.ReadFile(toolsPath)
if err != nil {
t.Fatalf("expected TOOLS.md to exist: %v", err)
}
if len(data) == 0 {
t.Fatal("TOOLS.md should not be empty")
}
}