Skip to content

Commit

Permalink
fix id naming in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mikegin committed Nov 30, 2020
1 parent 7a0d6cc commit b759f3e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/moleculer-db/test/integration/idField.test.js
Expand Up @@ -94,7 +94,7 @@ describe("Test CRUD methods with idField", () => {

it("should update an entity", () => {
return broker.call("posts.update", {
myID: posts[1].myID,
id: posts[1].myID,
title: "Other title",
content: "Modify my content",
votes: 8
Expand Down
2 changes: 1 addition & 1 deletion packages/moleculer-db/test/unit/index.actions.spec.js
Expand Up @@ -194,7 +194,7 @@ describe("Test DbService actions", () => {

it("should call the 'update' method", () => {
service._update.mockClear();
const p = { _id: 1, name: "John Smith", age: 45 };
const p = { id: 1, name: "John Smith", age: 45 };

return broker.call("store.update", p).catch(protectReject).then(ctx => {
expect(service._update).toHaveBeenCalledTimes(1);
Expand Down

0 comments on commit b759f3e

Please sign in to comment.