Update test cases to include clientId for ADO

Signed-off-by: Phill Morton <phill.morton@theaccessgroup.com>
This commit is contained in:
Phill Morton
2024-02-22 14:49:13 +00:00
parent 5e86653784
commit 7f3ed08594
@@ -112,7 +112,8 @@ describe('ScmAuth', () => {
await expect(
azureAuth.getCredentials({ url: 'http://example.com' }),
).resolves.toMatchObject({
token: 'vso.build vso.code vso.graph vso.project vso.profile',
token:
'499b84ac-1321-427f-aa17-267ca6975798/vso.build 499b84ac-1321-427f-aa17-267ca6975798/vso.code 499b84ac-1321-427f-aa17-267ca6975798/vso.graph 499b84ac-1321-427f-aa17-267ca6975798/vso.project 499b84ac-1321-427f-aa17-267ca6975798/vso.profile',
});
await expect(
azureAuth.getCredentials({
@@ -121,7 +122,7 @@ describe('ScmAuth', () => {
}),
).resolves.toMatchObject({
token:
'vso.build vso.code vso.graph vso.project vso.profile vso.code_manage',
'499b84ac-1321-427f-aa17-267ca6975798/vso.build 499b84ac-1321-427f-aa17-267ca6975798/vso.code 499b84ac-1321-427f-aa17-267ca6975798/vso.graph 499b84ac-1321-427f-aa17-267ca6975798/vso.project 499b84ac-1321-427f-aa17-267ca6975798/vso.profile 499b84ac-1321-427f-aa17-267ca6975798/vso.code_manage',
});
const bitbucketAuth = ScmAuth.forBitbucket(mockAuthApi);
@@ -174,10 +175,15 @@ describe('ScmAuth', () => {
await expect(
azureAuth.getCredentials({
url: 'http://example.com',
additionalScope: { customScopes: { azure: ['vso.org'] } },
additionalScope: {
customScopes: {
azure: ['499b84ac-1321-427f-aa17-267ca6975798/vso.org'],
},
},
}),
).resolves.toMatchObject({
token: 'vso.build vso.code vso.graph vso.project vso.profile vso.org',
token:
'499b84ac-1321-427f-aa17-267ca6975798/vso.build 499b84ac-1321-427f-aa17-267ca6975798/vso.code 499b84ac-1321-427f-aa17-267ca6975798/vso.graph 499b84ac-1321-427f-aa17-267ca6975798/vso.project 499b84ac-1321-427f-aa17-267ca6975798/vso.profile 499b84ac-1321-427f-aa17-267ca6975798/vso.org',
});
const bitbucketAuth = ScmAuth.forBitbucket(mockAuthApi);