Skip to content

Commit

Permalink
one more test
Browse files Browse the repository at this point in the history
  • Loading branch information
stephmilovic committed Jul 25, 2022
1 parent 485e86f commit 219018c
Showing 1 changed file with 19 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -647,8 +647,8 @@ describe('Cases webhook service', () => {
requestMock.mockImplementation(() =>
createAxiosResponse({
data: {
id: '1',
key: 'CK-1',
id: '../../malicious-app/malicious-endpoint/',
key: '../../malicious-app/malicious-endpoint/',
fields: {
updated: '2020-04-27T10:59:46.202Z',
created: '2020-04-27T10:59:46.202Z',
Expand All @@ -668,6 +668,23 @@ describe('Cases webhook service', () => {
);
});

test('createIncident- escapes url', async () => {
const incident = {
incident: {
title: 'title',
description: 'desc',
tags: ['hello', 'world'],
issueType: '10006',
priority: 'High',
parent: 'RJ-107',
},
};
const res = await service.createIncident(incident);
expect(res.url).toEqual(
'https://siem-kibana.atlassian.net/browse/..%2F..%2Fmalicious-app%2Fmalicious-endpoint%2F'
);
});

test('updateIncident- escapes url', async () => {
const incident = {
incidentId: '../../malicious-app/malicious-endpoint/',
Expand Down

0 comments on commit 219018c

Please sign in to comment.