@@ -42,13 +42,14 @@ describe('bitbucketServer core', () => {
|
||||
username: 'u',
|
||||
password: 'p',
|
||||
};
|
||||
const withBasicAuthAndTokenPrecedence: BitbucketServerIntegrationConfig = {
|
||||
host: '',
|
||||
apiBaseUrl: '',
|
||||
token: 'A',
|
||||
username: 'u',
|
||||
password: 'p',
|
||||
};
|
||||
const withBasicAuthAndTokenPrecedence: BitbucketServerIntegrationConfig =
|
||||
{
|
||||
host: '',
|
||||
apiBaseUrl: '',
|
||||
token: 'A',
|
||||
username: 'u',
|
||||
password: 'p',
|
||||
};
|
||||
const withoutCredentials: BitbucketServerIntegrationConfig = {
|
||||
host: '',
|
||||
apiBaseUrl: '',
|
||||
@@ -62,8 +63,10 @@ describe('bitbucketServer core', () => {
|
||||
.Authorization,
|
||||
).toEqual('Basic dTpw');
|
||||
expect(
|
||||
(getBitbucketServerRequestOptions(withBasicAuthAndTokenPrecedence).headers as any)
|
||||
.Authorization,
|
||||
(
|
||||
getBitbucketServerRequestOptions(withBasicAuthAndTokenPrecedence)
|
||||
.headers as any
|
||||
).Authorization,
|
||||
).toEqual('Bearer A');
|
||||
expect(
|
||||
(getBitbucketServerRequestOptions(withoutCredentials).headers as any)
|
||||
|
||||
Reference in New Issue
Block a user