Mock Service added back to test.
This commit is contained in:
parent
91f2556e4c
commit
a1e1ebb5c3
@ -41,17 +41,20 @@ func (fm testFolderMatcher) Matches(path string) bool {
|
|||||||
|
|
||||||
type SharePointLibrariesSuite struct {
|
type SharePointLibrariesSuite struct {
|
||||||
suite.Suite
|
suite.Suite
|
||||||
|
mockService mockServicer
|
||||||
}
|
}
|
||||||
|
|
||||||
func (suite *SharePointLibrariesSuite) Client() *msgraphsdk.GraphServiceClient {
|
type mockServicer struct{}
|
||||||
|
|
||||||
|
func (mock mockServicer) Client() *msgraphsdk.GraphServiceClient {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (suite *SharePointLibrariesSuite) Adapter() *msgraphsdk.GraphRequestAdapter {
|
func (mock mockServicer) Adapter() *msgraphsdk.GraphRequestAdapter {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (suite *SharePointLibrariesSuite) Serialize(object absser.Parsable) ([]byte, error) {
|
func (mock mockServicer) Serialize(object absser.Parsable) ([]byte, error) {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,7 +109,7 @@ func (suite *SharePointLibrariesSuite) TestUpdateCollections() {
|
|||||||
site,
|
site,
|
||||||
onedrive.SharePointSource,
|
onedrive.SharePointSource,
|
||||||
testFolderMatcher{test.scope},
|
testFolderMatcher{test.scope},
|
||||||
suite,
|
suite.mockService,
|
||||||
nil,
|
nil,
|
||||||
control.Options{})
|
control.Options{})
|
||||||
err := c.UpdateCollections(ctx, "driveID", test.items)
|
err := c.UpdateCollections(ctx, "driveID", test.items)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user