mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
Fixed tests
This commit is contained in:
parent
dc6b92d52e
commit
4b5ef56c56
@ -617,7 +617,7 @@ describe('_getAwsAuthHeaders', () => {
|
||||
.toMatch(/^\d{8}T\d{6}Z$/);
|
||||
expect(filterHeaders(headers, 'host')[0].value).toEqual('ec2.us-west-2.amazonaws.com');
|
||||
expect(filterHeaders(headers, 'authorization')[0].value)
|
||||
.toMatch(/^AWS4-HMAC-SHA256 Credential=AKIA99999999\/20180430\/us-west-2\/ec2\/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date;x-amz-security-token, Signature=[a-z0-9]*$/);
|
||||
.toMatch(/^AWS4-HMAC-SHA256 Credential=AKIA99999999\/\d{8}\/us-west-2\/ec2\/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date;x-amz-security-token, Signature=[a-z0-9]*$/);
|
||||
expect(filterHeaders(headers, 'content-type'))
|
||||
.toHaveLength(0);
|
||||
});
|
||||
@ -656,7 +656,7 @@ describe('_getAwsAuthHeaders', () => {
|
||||
.toMatch(/^\d{8}T\d{6}Z$/);
|
||||
expect(filterHeaders(headers, 'host')[0].value).toEqual('example.com');
|
||||
expect(filterHeaders(headers, 'authorization')[0].value)
|
||||
.toMatch(/^AWS4-HMAC-SHA256 Credential=AKIA99999999\/20180430\/us-west-2\/ec2\/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-security-token, Signature=[a-z0-9]*$/);
|
||||
.toMatch(/^AWS4-HMAC-SHA256 Credential=AKIA99999999\/\d{8}\/us-west-2\/ec2\/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-security-token, Signature=[a-z0-9]*$/);
|
||||
expect(filterHeaders(headers, 'content-type'))
|
||||
.toHaveLength(0);
|
||||
});
|
||||
|
@ -4,7 +4,6 @@ import * as React from 'react';
|
||||
import classnames from 'classnames';
|
||||
import autobind from 'autobind-decorator';
|
||||
import OneLineEditor from '../../codemirror/one-line-editor';
|
||||
import * as misc from '../../../../common/misc';
|
||||
import HelpTooltip from '../../help-tooltip';
|
||||
import {
|
||||
SIGNATURE_METHOD_HMAC_SHA1,
|
||||
|
@ -6,8 +6,15 @@ import * as React from 'react';
|
||||
import classnames from 'classnames';
|
||||
import autobind from 'autobind-decorator';
|
||||
import OneLineEditor from '../../codemirror/one-line-editor';
|
||||
import * as misc from '../../../../common/misc';
|
||||
import {GRANT_TYPE_AUTHORIZATION_CODE, GRANT_TYPE_CLIENT_CREDENTIALS, GRANT_TYPE_IMPLICIT, GRANT_TYPE_PASSWORD, RESPONSE_TYPE_ID_TOKEN, RESPONSE_TYPE_ID_TOKEN_TOKEN, RESPONSE_TYPE_TOKEN} from '../../../../network/o-auth-2/constants';
|
||||
import {
|
||||
GRANT_TYPE_AUTHORIZATION_CODE,
|
||||
GRANT_TYPE_CLIENT_CREDENTIALS,
|
||||
GRANT_TYPE_IMPLICIT,
|
||||
GRANT_TYPE_PASSWORD,
|
||||
RESPONSE_TYPE_ID_TOKEN,
|
||||
RESPONSE_TYPE_ID_TOKEN_TOKEN,
|
||||
RESPONSE_TYPE_TOKEN
|
||||
} from '../../../../network/o-auth-2/constants';
|
||||
import authorizationUrls from '../../../../datasets/authorization-urls';
|
||||
import accessTokenUrls from '../../../../datasets/access-token-urls';
|
||||
import getAccessToken from '../../../../network/o-auth-2/get-token';
|
||||
|
Loading…
Reference in New Issue
Block a user