Acabados de corregir bugs
This commit is contained in:
@@ -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])
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user