Skip to content

Commit

Permalink
fix list handler mock
Browse files Browse the repository at this point in the history
  • Loading branch information
HiteshRepo committed Jan 3, 2024
1 parent a128948 commit 81fcdbc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/internal/m365/collection/site/collection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,8 @@ func (suite *SharePointCollectionSuite) TestLazyCollection_Items() {
expectReads []string
}{
{
name: "no lists",
name: "no lists",
expectReads: []string{},
},
{
name: "added lists",
Expand All @@ -366,7 +367,7 @@ func (suite *SharePointCollectionSuite) TestLazyCollection_Items() {
ctx, flush := tester.NewContext(t)
defer flush()

getter := &mock.ListHandler{}
getter := mock.NewListHandler(nil, "", nil)
defer getter.Check(t, test.expectReads)

col := NewLazyFetchCollection(
Expand Down
2 changes: 2 additions & 0 deletions src/internal/m365/collection/site/mock/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ func (lh ListHandler) GetItemByID(
ls.SetId(ptr.To(itemID))
ls.SetList(listInfo)

lh.listsMap[itemID] = ls

return ls, lstInfo, lh.err
}

Expand Down

0 comments on commit 81fcdbc

Please sign in to comment.