Fix tests

This commit is contained in:
Gregory Schier
2020-02-11 14:24:52 -05:00
parent 1e50cd4a53
commit 4033f0d3b7
4 changed files with 8 additions and 8 deletions

View File

@@ -136,7 +136,7 @@ async function _findRecentForRequest(
environmentId: string | null,
limit: number,
): Promise<Array<Response>> {
const query = {
const query: Object = {
parentId: requestId,
};
@@ -170,7 +170,7 @@ export async function create(patch: Object = {}, maxResponses: number = 20) {
patch.requestVersionId = requestVersion ? requestVersion._id : null;
// Filter responses by environment if setting is enabled
const query = { parentId };
const query: Object = { parentId };
if (
(await models.settings.getOrCreate()).filterResponsesByEnv &&
patch.hasOwnProperty('environmentId')

View File

@@ -104,7 +104,7 @@ describe('authorization_code', () => {
error: null,
error_uri: null,
error_description: null,
xResponseId: 'res_dd2ccc1a2745477a881a9e8ef9d42403',
xResponseId: expect.stringMatching(/^res_/),
});
});
@@ -191,7 +191,7 @@ describe('authorization_code', () => {
error: null,
error_uri: null,
error_description: null,
xResponseId: 'res_e3e96e5fdd6842298b66dee1f0940f3d',
xResponseId: expect.stringMatching(/^res_/),
});
});
});

View File

@@ -93,7 +93,7 @@ describe('client_credentials', () => {
error: null,
error_uri: null,
error_description: null,
xResponseId: 'res_dd2ccc1a2745477a881a9e8ef9d42403',
xResponseId: expect.stringMatching(/^res_/),
});
});
@@ -173,7 +173,7 @@ describe('client_credentials', () => {
error: null,
error_uri: null,
error_description: null,
xResponseId: 'res_e3e96e5fdd6842298b66dee1f0940f3d',
xResponseId: expect.stringMatching(/^res_/),
});
});
});

View File

@@ -95,7 +95,7 @@ describe('password', () => {
error: null,
error_uri: null,
error_description: null,
xResponseId: 'res_dd2ccc1a2745477a881a9e8ef9d42403',
xResponseId: expect.stringMatching(/^res_/),
});
});
@@ -176,7 +176,7 @@ describe('password', () => {
error: null,
error_uri: null,
error_description: null,
xResponseId: 'res_e3e96e5fdd6842298b66dee1f0940f3d',
xResponseId: expect.stringMatching(/^res_/),
});
});
});