wip: delete response

This commit is contained in:
Eugene Molodkin 2024-11-07 13:28:28 +01:00 committed by Oleg Ivaniv
parent 51533bdf04
commit 9e42159db7
No known key found for this signature in database

View file

@ -391,3 +391,18 @@ describe('DELETE /evaluation/test-definitions/:id', () => {
expect(resp.body.message).toBe('Annotation tag not found');
});
});
describe('DELETE /evaluation/test-definitions/:id', () => {
test('should delete test definition', async () => {
const newTest = Container.get(TestDefinitionRepository).create({
name: 'test',
workflow: { id: workflowUnderTest.id },
});
await Container.get(TestDefinitionRepository).save(newTest);
const resp = await authOwnerAgent.delete(`/evaluation/test-definitions/${newTest.id}`);
expect(resp.statusCode).toBe(200);
expect(resp.body.data.success).toBe(true);
});
});