Skip to content
Snippets Groups Projects
Commit 52d1d8b7 authored by Øivind Haugerøy Larsson's avatar Øivind Haugerøy Larsson
Browse files

first delete test

parent a646399a
No related branches found
No related tags found
No related merge requests found
Pipeline #22827 failed
......@@ -30,4 +30,12 @@ module.exports = class PersonDao extends Dao {
callback
)
}
deleteOne(id, callback) {
super.query(
"delete from person where id = ?",
[id],
callback
)
}
};
......@@ -97,3 +97,15 @@ test("update person from db", done => {
callback
);
})
test("delete person from db", done => {
function callback(staus, data) {
console.log(
"Test callback: status= " + status + ", data=" +JSON.stringify(data)
);
expect(personDao.getAll(callback)).toBe(1);
expect(data.affectedRows).toBeGreaterThanOrEqual(1);
done();
}
personDao.deleteOne(2, callback);
})
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment