Skip to content
Snippets Groups Projects
Commit d4718a42 authored by Magnus Revheim Martinsen's avatar Magnus Revheim Martinsen
Browse files

changed update test in persondao.test.js

parent 8c3d11cc
No related branches found
No related tags found
No related merge requests found
Pipeline #22930 passed
......@@ -81,13 +81,14 @@ test("get all persons from db", done => {
test("update a persons data to db", done => {
function callback(status, data) {
console.log(
"Test callback: status=" + status + ", data.length=" + data.length
"Test callback: status=" + status + ", data=" + JSON.stringify(data)
);
expect(data.affectedRows).toBe(1);
expect(data.changedRows).toBe(1);
done();
}
personDao.updateOne(
3,
1,
{ navn: "per", adresse: "ila 5", alder: 23},
callback);
});
......@@ -95,7 +96,7 @@ test("update a persons data to db", done => {
test("delete a person in db", done => {
function callback(status, data) {
console.log(
"Test callback: status=" + status + ", data.length=" + data.length
"Test callback: status=" + status + ", data=" + JSON.stringify(data)
);
expect(data.affectedRows).toBe(1);
done();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment