docs: describes usage of plugin

This commit is contained in:
Sebastian Rindom
2021-04-07 11:00:24 +02:00
parent 69442a1735
commit fdbf11ac7a
8 changed files with 188 additions and 26 deletions
@@ -88,10 +88,7 @@ describe("RestockNotificationService", () => {
it("successfully adds email to non-existing noti", async () => {
jest.clearAllMocks()
const result = await restockNotiService.addEmail(
"variant_test",
"seb@med-test.com"
)
await restockNotiService.addEmail("variant_test", "seb@med-test.com")
expect(RestockNotificationModel.create).toHaveBeenCalledTimes(1)
expect(RestockNotificationModel.create).toHaveBeenCalledWith({
@@ -105,10 +102,7 @@ describe("RestockNotificationService", () => {
it("successfully adds email to existing noti", async () => {
jest.clearAllMocks()
const result = await restockNotiService.addEmail(
"variant_1234",
"seb@med-test.com"
)
await restockNotiService.addEmail("variant_1234", "seb@med-test.com")
expect(RestockNotificationModel.save).toHaveBeenCalledTimes(1)
expect(RestockNotificationModel.save).toHaveBeenCalledWith({