Skip to content

Commit 3431d49

Browse files
committed
test: fix custom guide command test
1 parent 1a1bff5 commit 3431d49

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/Feature/Console/CustomGuideCommandTest.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,16 @@
108108
$content = file_get_contents($filePath);
109109

110110
expect($content)->toContain('# My Guide');
111-
expect($content)->not->toContain('##');
112111
expect($content)->toContain('<!-- Add your custom guidelines here -->');
112+
expect($content)->toContain('## Project Overview');
113+
// Verify no user description is added before the template sections
114+
$lines = explode("\n", $content);
115+
$titleIndex = array_search('# My Guide', $lines);
116+
$commentIndex = array_search('<!-- Add your custom guidelines here -->', $lines);
117+
// Between title and comment, there should only be blank lines (no ## description)
118+
for ($i = $titleIndex + 1; $i < $commentIndex; $i++) {
119+
expect(trim($lines[$i]))->toBe('');
120+
}
113121
});
114122

115123
test('truncates title to 200 characters', function (): void {

0 commit comments

Comments
 (0)