PR Review fixes

This commit is contained in:
olivermrbl
2021-06-07 15:23:41 +02:00
parent e79b8f6494
commit c0f2d629ab
18 changed files with 195 additions and 91 deletions
@@ -12,6 +12,7 @@ const {
DraftOrder,
Discount,
DiscountRule,
Payment,
} = require("@medusajs/medusa");
module.exports = async (connection, data = {}) => {
@@ -189,6 +190,19 @@ module.exports = async (connection, data = {}) => {
metadata: { draft_order_id: "test-draft-order" },
});
const pay = manager.create(Payment, {
id: "test-payment",
amount: 10000,
currency_code: "usd",
amount_refunded: 0,
provider_id: "test-pay",
data: {},
});
await manager.save(pay);
c.payment = pay;
await manager.save(c);
await manager.insert(PaymentSession, {
@@ -197,12 +211,12 @@ module.exports = async (connection, data = {}) => {
provider_id: "test-pay",
is_selected: true,
data: {},
status: "pending",
status: "authorized",
});
const draftOrder = manager.create(DraftOrder, {
id: "test-draft-order",
status: "awaiting",
status: "open",
display_id: 4,
cart_id: "test-cart",
customer_id: "oli-test",