diff --git a/dao/persondao.test.js b/dao/persondao.test.js index 594cb4a301729711bd3cf240b960e2558aceeffe..55d3ffeba9335330faa8f7926ece09722b0ef13c 100644 --- a/dao/persondao.test.js +++ b/dao/persondao.test.js @@ -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();