fix: adds integration test to create endpoint

This commit is contained in:
Sebastian Rindom committed 2021-03-08 15:44:37 +01:00
1 parent 9ce935a779
commit 521d306b71
3 files changed
+85 -3

No files matched your search

@@ -20,9 +20,12 @@ export default async (req, res) => {
try {
const giftCardService = req.scope.resolve("giftCardService")
await giftCardService.create(value)
const newly = await giftCardService.create({
...value,
balance: value.value,
})
const giftCard = await giftCardService.retrieve(id, {
const giftCard = await giftCardService.retrieve(newly.id, {
select: defaultFields,
relations: defaultRelations,
})