Skip to content

Commit

Permalink
Fix import
Browse files Browse the repository at this point in the history
  • Loading branch information
marshallmain committed Aug 3, 2023
1 parent 3588626 commit 9df00eb
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
* 2.0.
*/

import { ReadConsoleRequestSchema } from '../../../../common/api/risk_score/read_prebuilt_dev_tool_content/read_prebuilt_dev_tool_content_route';
import { readConsoleRequestBody } from '../../../../common/api/risk_score';

describe('ReadConsoleRequestSchema', () => {
it('should throw error', () => {
expect(() => ReadConsoleRequestSchema.params.validate({ console_id: '123' })).toThrow();
expect(() => readConsoleRequestBody.params.validate({ console_id: '123' })).toThrow();
});

it.each([['enable_host_risk_score', 'enable_user_risk_score']])(
'should allow console_id %p',
async (template) => {
expect(ReadConsoleRequestSchema.params.validate({ console_id: template })).toEqual({
expect(readConsoleRequestBody.params.validate({ console_id: template })).toEqual({
console_id: template,
});
}
Expand Down

0 comments on commit 9df00eb

Please sign in to comment.