Basic option selection

This commit is contained in:
shamoon
2024-11-08 00:23:42 -08:00
parent 62b470f691
commit ec12e71487
8 changed files with 58 additions and 12 deletions

View File

@@ -130,14 +130,14 @@ describe('TasksService', () => {
date_created: new Date(),
}
tasksService.retryTask(task).subscribe()
tasksService.retryTask(task, true).subscribe()
const reloadSpy = jest.spyOn(tasksService, 'reload')
const req = httpTestingController.expectOne(
`${environment.apiBaseUrl}tasks/${task.id}/retry/`
)
expect(req.request.method).toEqual('POST')
expect(req.request.body).toEqual({
task_id: task.id,
clean: true,
})
req.flush({ task_id: 12345 })
expect(reloadSpy).toHaveBeenCalled()