Skip to content

Commit d537795

Browse files
Fix unreasonable update tests (#181)
The tests fixed for cds9 in this PR did some rather weird things like: ```js UPDATE(Foo).with({ ID:111, bar:12 }) // would change all rows in Foo to have the same ID: 111 ``` ... which should rather be like that: ```js UPDATE(Foo,{ID:111}).with({ bar:12 }) // updates Foo #111 only ``` --------- Co-authored-by: D045778 <[email protected]>
1 parent 6c1b57f commit d537795

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/integration/service-api.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ describe("change log integration test", () => {
367367
expect(createEntityChange.objectID).to.equal("In Preparation");
368368

369369
// Test the object id when the parent node and child node are modified at the same time
370-
await UPDATE(adminService.entities.RootEntity)
370+
await UPDATE(adminService.entities.RootEntity, {ID: "01234567-89ab-cdef-0123-987654fedcba"})
371371
.with({
372372
ID: "01234567-89ab-cdef-0123-987654fedcba",
373373
name: "RootEntity name changed",
@@ -398,7 +398,7 @@ describe("change log integration test", () => {
398398
expect(updateEntityChange.objectID).to.equal("Open");
399399

400400
// Tests the object id when the parent node update and child node deletion occur simultaneously
401-
await UPDATE(adminService.entities.RootEntity)
401+
await UPDATE(adminService.entities.RootEntity, {ID: "01234567-89ab-cdef-0123-987654fedcba"})
402402
.with({
403403
ID: "01234567-89ab-cdef-0123-987654fedcba",
404404
name: "RootEntity name del",

0 commit comments

Comments
 (0)