@@ -63,13 +63,15 @@ function Test_NewNote_Simple_WithOutDate{
6363
6464 $category = " TestClient"
6565 $title = " This is the title of the note"
66+ $date = (Get-Date ).ToString(" yyMMdd" )
6667
67- $header = " # {category} - {title} (NoDate )"
68+ $header = " # {category} - {title} ({date} )"
6869 $header = $header -replace " {category}" , $category
6970 $header = $header -replace " {title}" , $title
71+ $header = $header -replace " {date}" , $date
7072
71- # Add note with date
72- $path = New-Note $category $title - NoOpen - Force - Date $date
73+ # Add note with DateToday
74+ $path = New-Note $category $title - NoOpen - Force - DateToday
7375
7476 $content = Get-Content - Path $path - Raw
7577
@@ -185,19 +187,18 @@ function Test_NewNotes_SUCCESS{
185187 New-TestingFolder - Path " ./TestNotesRoot/howto"
186188 $today = (Get-Date ).ToString(" yyMMdd" )
187189
188- # Act
189- $result = New-Note howto " someting that may be useful" - NoOpen
190+ # Act - With DateToday
191+ $result = New-Note howto " someting that may be useful" - NoOpen - DateToday
190192
191- # $expectedPath = "./TestNotesRoot/howto/howto-someting_that_may_be_useful/howto-someting_that_may_be_useful.md"
192- $expectedPath = " ./TestNotesRoot/howto/howto-someting_that_may_be_useful.md"
193+ $expectedPath = " ./TestNotesRoot/howto/$today -howto-someting_that_may_be_useful.md"
193194
194195 Assert-AreEqualPath - Expected $expectedPath - Presented $result
195196
196- # With date
197+ # With explicit date
197198
198- $result = New-Note howto " someting that may be useful" - NoOpen - Date $today
199+ $result = New-Note howto " someting that may be useful 2 " - NoOpen - Date $today
199200
200- $expectedPath = " ./TestNotesRoot/howto/$today -howto-someting_that_may_be_useful .md"
201+ $expectedPath = " ./TestNotesRoot/howto/$today -howto-someting_that_may_be_useful_2 .md"
201202
202203 Assert-AreEqualPath - Expected $expectedPath - Presented $result
203204
@@ -214,19 +215,18 @@ function Test_NewNotes_SUCCESS_WithRootPath{
214215 New-TestingFolder - Path " ./$RootFolder /howto"
215216 $today = (Get-Date ).ToString(" yyMMdd" )
216217
217- # Act
218- $result = New-Note howto " someting that may be useful" - NoOpen - RootPath $RootFolder
218+ # Act - With DateToday
219+ $result = New-Note howto " someting that may be useful" - NoOpen - RootPath $RootFolder - DateToday
219220
220- # $expectedPath = "./$RootFolder/howto/howto-someting_that_may_be_useful/howto-someting_that_may_be_useful.md"
221- $expectedPath = " ./$RootFolder /howto/howto-someting_that_may_be_useful.md"
221+ $expectedPath = " ./$RootFolder /howto/$today -howto-someting_that_may_be_useful.md"
222222
223223 Assert-AreEqualPath - Expected $expectedPath - Presented $result
224224
225- # With date
225+ # With explicit date
226226
227- $result = New-Note howto " someting that may be useful" - NoOpen - Date $today - RootPath $RootFolder
227+ $result = New-Note howto " someting that may be useful 2 " - NoOpen - Date $today - RootPath $RootFolder
228228
229- $expectedPath = " ./$RootFolder /howto/$today -howto-someting_that_may_be_useful .md"
229+ $expectedPath = " ./$RootFolder /howto/$today -howto-someting_that_may_be_useful_2 .md"
230230
231231 Assert-AreEqualPath - Expected $expectedPath - Presented $result
232232
0 commit comments