fix: tests

This commit is contained in:
zakariaelas
2021-10-01 16:41:27 +01:00
parent 632ad17e3f
commit db83448d18
15 changed files with 793 additions and 1061 deletions
@@ -1,5 +1,22 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`/admin/auth creates store session correctly 1`] = `
Object {
"billing_address_id": null,
"created_at": Any<String>,
"deleted_at": null,
"email": "test@testesen.dk",
"first_name": "test",
"has_account": true,
"id": Any<String>,
"last_name": "testesen",
"metadata": null,
"orders": Array [],
"phone": "12345678",
"updated_at": Any<String>,
}
`;
exports[`/admin/discounts creates store session correctly 1`] = `
Object {
"billing_address_id": null,
@@ -145,6 +145,7 @@ describe("/store/carts", () => {
discounts: [{ code: "CREATED" }],
})
} catch (error) {
console.log(error.response)
expect(error.response.status).toEqual(400)
expect(error.response.data.message).toEqual(
"Discount has been used maximum allowed times"