chore: abstract the modules repository (#6035)
**What** Reduce the work effort to create repositories when building new modules by abstracting the most common cases into the base class default implementation returned by a factory - [x] Migrate all modules Co-authored-by: Riqwan Thamir <5105988+riqwan@users.noreply.github.com>
This commit is contained in:
co-authored by
Riqwan Thamir
parent
ef5024980d
commit
b6ac768698
@@ -212,7 +212,7 @@ describe("PriceListRule Service", () => {
|
||||
}
|
||||
|
||||
expect(error.message).toEqual(
|
||||
'PriceListRule with id(s) "does-not-exist" not found'
|
||||
'PriceListRule with id "does-not-exist" not found'
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -283,7 +283,7 @@ describe("PriceRule Service", () => {
|
||||
error = e
|
||||
}
|
||||
|
||||
expect(error.message).toEqual('PriceRule with id "undefined" not found')
|
||||
expect(error.message).toEqual('PriceRule with id "" not found')
|
||||
})
|
||||
|
||||
it("should create a priceRule successfully", async () => {
|
||||
|
||||
@@ -370,7 +370,7 @@ describe("PriceSet Service", () => {
|
||||
error = e
|
||||
}
|
||||
|
||||
expect(error.message).toEqual('PriceSet with id "undefined" not found')
|
||||
expect(error.message).toEqual('PriceSet with id "" not found')
|
||||
})
|
||||
|
||||
it("should create a priceSet successfully", async () => {
|
||||
|
||||
+1
-1
@@ -213,7 +213,7 @@ describe("PriceListRule Service", () => {
|
||||
}
|
||||
|
||||
expect(error.message).toEqual(
|
||||
'PriceListRule with id(s) "does-not-exist" not found'
|
||||
'PriceListRule with id "does-not-exist" not found'
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import { CreatePriceRuleDTO, IPricingModuleService } from "@medusajs/types"
|
||||
import { SqlEntityManager } from "@mikro-orm/postgresql"
|
||||
|
||||
import { PriceSetMoneyAmount, initialize } from "../../../../src"
|
||||
import { initialize, PriceSetMoneyAmount } from "../../../../src"
|
||||
import { createCurrencies } from "../../../__fixtures__/currency"
|
||||
import { createMoneyAmounts } from "../../../__fixtures__/money-amount"
|
||||
import { createPriceRules } from "../../../__fixtures__/price-rule"
|
||||
@@ -279,7 +279,7 @@ describe("PricingModule Service - PriceRule", () => {
|
||||
error = e
|
||||
}
|
||||
|
||||
expect(error.message).toEqual('PriceRule with id "undefined" not found')
|
||||
expect(error.message).toEqual('PriceRule with id "" not found')
|
||||
})
|
||||
|
||||
it("should create a PriceRule successfully", async () => {
|
||||
|
||||
Reference in New Issue
Block a user