test: improve tests of CatalogImportClient
Signed-off-by: Benjamin Janssens <benji.janssens@gmail.com>
This commit is contained in:
@@ -588,6 +588,12 @@ describe('CatalogImportClient', () => {
|
||||
'https://github.com/backstage/backstage/blob/main/catalog-info.yaml',
|
||||
});
|
||||
expect(catalogApi.validateEntity).toHaveBeenCalledTimes(1);
|
||||
expect(scmAuthApi.getCredentials).toHaveBeenCalledWith({
|
||||
host: 'github.com',
|
||||
additionalScope: {
|
||||
repoWrite: true,
|
||||
},
|
||||
});
|
||||
expect(
|
||||
(new Octokit().git.createRef as any as jest.Mock).mock.calls[0][0],
|
||||
).toEqual({
|
||||
@@ -701,6 +707,13 @@ describe('CatalogImportClient', () => {
|
||||
}),
|
||||
);
|
||||
|
||||
expect(scmAuthApi.getCredentials).toHaveBeenCalledWith({
|
||||
host: 'github.com',
|
||||
additionalScope: {
|
||||
repoWrite: true,
|
||||
},
|
||||
});
|
||||
|
||||
expect(
|
||||
(new Octokit().git.createRef as any as jest.Mock).mock.calls[0][0],
|
||||
).toEqual(
|
||||
|
||||
Reference in New Issue
Block a user