Update test cases to include clientId for ADO
Signed-off-by: Phill Morton <phill.morton@theaccessgroup.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user