From 41bb7463bbb73282f43054b30639555ded33b11d Mon Sep 17 00:00:00 2001 From: Sebastian Rindom Date: Tue, 29 Jun 2021 16:44:52 +0200 Subject: [PATCH] chore: update tests --- .../api/routes/store/customers/__tests__/create-customer.js | 3 ++- .../api/routes/store/customers/__tests__/update-customer.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/medusa/src/api/routes/store/customers/__tests__/create-customer.js b/packages/medusa/src/api/routes/store/customers/__tests__/create-customer.js index ff8606cf3b..d42d3ba41b 100644 --- a/packages/medusa/src/api/routes/store/customers/__tests__/create-customer.js +++ b/packages/medusa/src/api/routes/store/customers/__tests__/create-customer.js @@ -1,6 +1,7 @@ import { IdMap } from "medusa-test-utils" import { request } from "../../../../../helpers/test-request" import { CustomerServiceMock } from "../../../../../services/__mocks__/customer" +import { defaultFields, defaultRelations } from "../" describe("POST /store/customers", () => { describe("successfully creates a customer", () => { @@ -34,7 +35,7 @@ describe("POST /store/customers", () => { expect(CustomerServiceMock.retrieve).toHaveBeenCalledTimes(1) expect(CustomerServiceMock.retrieve).toHaveBeenCalledWith( IdMap.getId("lebron"), - { relations: ["shipping_addresses"] } + { relations: defaultRelations, select: defaultFields } ) }) diff --git a/packages/medusa/src/api/routes/store/customers/__tests__/update-customer.js b/packages/medusa/src/api/routes/store/customers/__tests__/update-customer.js index 35c54520c4..5b5887cdad 100644 --- a/packages/medusa/src/api/routes/store/customers/__tests__/update-customer.js +++ b/packages/medusa/src/api/routes/store/customers/__tests__/update-customer.js @@ -1,5 +1,6 @@ import { IdMap } from "medusa-test-utils" import { request } from "../../../../../helpers/test-request" +import { defaultFields, defaultRelations } from "../" import { CustomerServiceMock } from "../../../../../services/__mocks__/customer" describe("POST /store/customers/:id", () => { @@ -42,7 +43,7 @@ describe("POST /store/customers/:id", () => { expect(CustomerServiceMock.retrieve).toHaveBeenCalledTimes(1) expect(CustomerServiceMock.retrieve).toHaveBeenCalledWith( IdMap.getId("lebron"), - { relations: ["shipping_addresses"] } + { relations: defaultRelations, select: defaultFields } ) })