Skip to content

Commit 44adf98

Browse files
fix(test): update GetConvertPrompt test to match inlined content API
The convert prompt was refactored to accept PRD content directly instead of a directory path, but the test was not updated.
1 parent 1501c1a commit 44adf98

1 file changed

Lines changed: 7 additions & 11 deletions

File tree

embed/embed_test.go

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,27 +40,23 @@ func TestPromptTemplateNotEmpty(t *testing.T) {
4040
}
4141

4242
func TestGetConvertPrompt(t *testing.T) {
43-
prdDir := "/path/to/.chief/prds/my-feature"
44-
prompt := GetConvertPrompt(prdDir)
43+
prdContent := "# My Feature\n\nA cool feature PRD."
44+
prompt := GetConvertPrompt(prdContent)
4545

4646
// Verify the prompt is not empty
4747
if prompt == "" {
4848
t.Error("Expected GetConvertPrompt() to return non-empty prompt")
4949
}
5050

51-
// Verify PRD directory is substituted
52-
if !strings.Contains(prompt, prdDir) {
53-
t.Errorf("Expected prompt to contain PRD directory %q", prdDir)
51+
// Verify PRD content is inlined
52+
if !strings.Contains(prompt, prdContent) {
53+
t.Error("Expected prompt to contain the inlined PRD content")
5454
}
55-
if strings.Contains(prompt, "{{PRD_DIR}}") {
56-
t.Error("Expected {{PRD_DIR}} to be substituted")
55+
if strings.Contains(prompt, "{{PRD_CONTENT}}") {
56+
t.Error("Expected {{PRD_CONTENT}} to be substituted")
5757
}
5858

5959
// Verify key instructions are present
60-
if !strings.Contains(prompt, "prd.md") {
61-
t.Error("Expected prompt to mention prd.md")
62-
}
63-
6460
if !strings.Contains(prompt, "JSON") {
6561
t.Error("Expected prompt to mention JSON")
6662
}

0 commit comments

Comments
 (0)