Skip to content

Commit 49f1106

Browse files
committed
updated tests and readme
1 parent 5e7a50c commit 49f1106

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,12 @@ A PowerShell library for publishing markdown files authored in markdown to Blogg
6464

6565
When using `Markdown` format, files are saved as `<title>.md`
6666

67+
When using `JSON` format, files are saved as `<postid>.json`
68+
6769
```
6870
Get-BloggerPost -PostId <postid> -Format HTML
6971
Get-BloggerPost -PostId <postid> -Format Markdown
72+
Get-BloggerPost -PostId <postid> -Format JSON
7073
```
7174

7275
You can specify an output directory where the file will be saved.

src/public/Get-BloggerPost.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
The ID of the post to retrieve. This parameter is required.
1010
1111
.PARAMETER Format
12-
The format of the post content to retrieve. Use either Markdown or HTML.
12+
The format of the post content to retrieve. Use either Markdown, JSON or HTML.
1313
1414
.PARAMETER FolderDateFormat
1515
The folder name as expressed in a DateTime format string. For example, "YYYY/MM" which will save files

src/tests/Get-BloggerPost.Tests.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ Describe "Get-BloggerPost" {
182182
return @{
183183
id = $postId
184184
title = "Test Post"
185-
published = [datetime]"10/01/2023 12:00:00"
185+
published = [datetime]"2023-10-01T17:30:00-04:00"
186186
content = "<h1>Hello World</h1><p>This is a post.</p>"
187187
}
188188
}
@@ -224,7 +224,7 @@ BeforeEach {
224224
return @{
225225
id = $postId
226226
title = "Test Post"
227-
published = [datetime]"10/01/2023 12:00:00"
227+
published = [datetime]"2023-10-01T17:30:00-04:00"
228228
content = "<h1>Hello World</h1><p>This is a post.</p>"
229229
}
230230
}
@@ -270,7 +270,7 @@ BeforeEach {
270270
return @{
271271
id = $postId
272272
title = "Test Post"
273-
published = [datetime]"10/01/2023 12:00:00"
273+
published = [datetime]"2023-10-01T17:30:00-04:00"
274274
content = "<h1>Hello World</h1><p>This is a post.</p>"
275275
}
276276
}

0 commit comments

Comments
 (0)