fix(product): Add metadata to property to product category data model (#8766)
* fix: Add metadata to property to product category data model * chore: Add migration for adding metadata column to product category * chore: Added test for product category metadata
This commit is contained in:
@@ -175,6 +175,26 @@ medusaIntegrationTestRunner({
|
||||
})
|
||||
)
|
||||
})
|
||||
|
||||
it('gets the metadata of a category', async () => {
|
||||
await api.post(
|
||||
`/admin/product-categories/${productCategory.id}`,
|
||||
{
|
||||
metadata: {
|
||||
test: "test"
|
||||
},
|
||||
},
|
||||
adminHeaders
|
||||
)
|
||||
|
||||
const response = await api.get(
|
||||
`/admin/product-categories/${productCategory.id}`,
|
||||
adminHeaders
|
||||
)
|
||||
|
||||
expect(response.status).toEqual(200)
|
||||
expect(response.data.product_category.metadata).toEqual({ test: "test" })
|
||||
})
|
||||
})
|
||||
|
||||
describe("GET /admin/product-categories", () => {
|
||||
|
||||
Reference in New Issue
Block a user