Skip to content
Snippets Groups Projects
Commit 40fdf896 authored by Michael Staff Larsen's avatar Michael Staff Larsen
Browse files

Update persondao.test.js

parent 006d767c
No related branches found
No related tags found
No related merge requests found
Pipeline #50039 canceled
......@@ -77,3 +77,30 @@ test("get all persons from db", done => {
personDao.getAll(callback);
});
test("delete one from db", done => {
function callback(status, data) {
console.log(
"Test callback: status=" + status + ", data=" + JSON.stringify(data)
);
//Burde sjekke at riktig person er slettet
expect(data.affectedRows).toBe(1);
done();
}
personDao.deleteOne(1, callback);
});
test("update person in db", done => {
function callback(status, data) {
console.log(
"Test callback: status=" + status + ", data=" + JSON.stringify(data)
);
expect(data.affectedRows).toBe(1);
//expect(Person med id =3).toBe("Arne t");
done();
}
personDao.updateOne(
{ navn: "Arne t", alder: 77, adresse: "Gata 18", id: 3 },
callback);
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment