chore: update tests

This commit is contained in:
Sebastian Rindom
2021-06-29 16:44:52 +02:00
parent 6342e68d06
commit 41bb7463bb
2 changed files with 4 additions and 2 deletions
@@ -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 }
)
})
@@ -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 }
)
})