@@ -12,7 +12,7 @@ Describe "Get-BloggerPosts" {
1212
1313 # Setup initial get-bloggerposts
1414 Mock Invoke-GApi {
15- return @ {
15+ return [ pscustomobject ] @ {
1616 items = @ (
1717 @ { id = " 1" ; title = " Post 1" ; published = " 2023-10-01T00:00:00Z" },
1818 @ { id = " 2" ; title = " Post 2" ; published = " 2023-10-02T00:00:00Z" }
@@ -24,11 +24,10 @@ Describe "Get-BloggerPosts" {
2424
2525 # setup second call
2626 Mock Invoke-GApi {
27- @ {
27+ return [ pscustomobject ] @ {
2828 items = @ (
2929 @ { id = " 3" ; title = " Post 3" ; published = " 2023-10-03T00:00:00Z" }
3030 )
31- nextPageToken = $null
3231 }
3332 } - ParameterFilter { $uri -like " *pageToken*" }
3433 }
@@ -48,7 +47,7 @@ Describe "Get-BloggerPosts" {
4847 InModuleScope PSBlogger {
4948 # Setup initial get-bloggerposts
5049 Mock Invoke-GApi {
51- return @ {
50+ return [ pscustomobject ] @ {
5251 items = @ (
5352 @ { id = " 1" ; title = " Post 1" ; published = " 2023-10-01T00:00:00Z" },
5453 @ { id = " 2" ; title = " Post 2" ; published = " 2023-10-02T00:00:00Z" }
@@ -80,7 +79,7 @@ Describe "Get-BloggerPosts" {
8079
8180 # Mock the API call to return posts after a specific date
8281 Mock Invoke-GApi {
83- return @ {
82+ return [ pscustomobject ] @ {
8483 items = @ (
8584 @ { id = " 1" ; title = " Post 1" ; published = " 2023-10-01T00:00:00Z" },
8685 @ { id = " 2" ; title = " Post 2" ; published = " 2023-10-02T00:00:00Z" }
@@ -105,7 +104,7 @@ Describe "Get-BloggerPosts" {
105104
106105 # Mock the API call to return all posts
107106 Mock Invoke-GApi {
108- return @ {
107+ return [ pscustomobject ] @ {
109108 items = @ (
110109 @ { id = " 1" ; title = " Post 1" ; published = " 2023-10-01T00:00:00Z" },
111110 @ { id = " 2" ; title = " Post 2" ; published = " 2023-10-02T00:00:00Z" }
0 commit comments