This commit is contained in:
Bryan MacFarlane
2020-01-23 09:25:39 -05:00
parent f18f070af6
commit a77f06ef45
7 changed files with 19 additions and 16 deletions

View File

@@ -20,7 +20,7 @@ describe('auth', () => {
let auth: string = obj.headers.Authorization;
let creds: string = Buffer.from(auth.substring('Basic '.length), 'base64').toString();
expect(creds).toBe('johndoe:password');
expect(obj.url).toBe("https://httpbin.org/get");
expect(obj.url).toBe("http://httpbin.org/get");
});
it('does basic http get request with pat token auth', async() => {
@@ -36,7 +36,7 @@ describe('auth', () => {
let auth: string = obj.headers.Authorization;
let creds: string = Buffer.from(auth.substring('Basic '.length), 'base64').toString();
expect(creds).toBe('PAT:' + token);
expect(obj.url).toBe("https://httpbin.org/get");
expect(obj.url).toBe("http://httpbin.org/get");
});
it('does basic http get request with pat token auth', async() => {
@@ -51,6 +51,6 @@ describe('auth', () => {
let obj:any = JSON.parse(body);
let auth: string = obj.headers.Authorization;
expect(auth).toBe('Bearer ' + token);
expect(obj.url).toBe("https://httpbin.org/get");
expect(obj.url).toBe("http://httpbin.org/get");
});
})