Acabados de corregir bugs

This commit is contained in:
2026-04-09 11:53:49 +02:00
parent 5ea5939e3a
commit 047669bab2
6 changed files with 80 additions and 55 deletions

View File

@@ -8,7 +8,7 @@ const testTask: CreatePauseCancelTaskDTO = {
operation_type: "suspend",
activation_date: new Date(),
next_check: new Date(),
actionData: {
actiondata: {
dueDate: new Date().toString(),
correlation_id: "12223",
identifier: {
@@ -19,20 +19,14 @@ const testTask: CreatePauseCancelTaskDTO = {
}
describe("Test PauseCancelTaskRepository - DB", () => {
function clean() {
}
const createdIds: number[] = [];
const pauseRepo = new PauseCancelTaskRepository(postgrClient)
before(() => {
})
after(() => {
})
it("Should create a task", async () => {
@@ -66,12 +60,13 @@ describe("Test PauseCancelTaskRepository - DB", () => {
})
it("Should get at least 1 pending task", async () => {
const created = await pauseRepo.addTask(testTask)
const pending = await pauseRepo.getPending()
assert.ok(pending != undefined, "A value must be returned always")
assert.ok(pending.error == undefined, "Should not return a error")
assert.ok(pending.data != undefined, "Data must be returned")
console.log("--> ", pending.data)
console.log("--> ", pending.data[0])
})
})