MCPcopy Create free account
hub / github.com/github/gh-aw / TestGenerateWorkflowHeader_EmptyVersion

Function TestGenerateWorkflowHeader_EmptyVersion

pkg/workflow/header_test.go:90–105  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

88}
89
90func TestGenerateWorkflowHeader_EmptyVersion(t *testing.T) {
91 // Save original version
92 originalVersion := compilerVersion
93 defer func() { compilerVersion = originalVersion }()
94
95 // Test with empty version - should not include version in header
96 SetVersion("")
97 header := GenerateWorkflowHeader("test.md", "gh-aw", "")
98
99 if strings.Contains(header, "()") {
100 t.Error("Expected header to NOT include empty parentheses")
101 }
102 if !strings.Contains(header, "This file was automatically generated by gh-aw. DO NOT EDIT.") {
103 t.Error("Expected header to contain disclaimer without version")
104 }
105}
106
107func TestGenerateWorkflowHeader_NoGeneratedBy(t *testing.T) {
108 // Save original version

Callers

nothing calls this directly

Calls 3

SetVersionFunction · 0.85
GenerateWorkflowHeaderFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected