chore(types,notification): Make template nullable on emails (#13889)

* chore: Make template nullable on emails

* Create curvy-lamps-float.md
This commit is contained in:
Oli Juhl
2025-10-29 18:36:06 +01:00
committed by GitHub
parent ef7b9b9375
commit 01ee437926
6 changed files with 61 additions and 6 deletions
@@ -108,6 +108,30 @@ moduleIntegrationTestRunner<INotificationModuleService>({
provider_id: "test-provider",
external_id: "external_id",
status: NotificationStatus.SUCCESS,
template: "signup-template",
})
)
expect(dbEntry).not.toHaveProperty("content")
})
it("should send a notification without a template", async () => {
const notification = {
to: "admin@medusa.com",
channel: "email",
content: {
html: "<p>Welcome to medusa</p>",
},
}
const result = await service.createNotifications(notification)
const dbEntry = await service.retrieveNotification(result.id)
expect(dbEntry).toEqual(
expect.objectContaining({
provider_id: "test-provider",
external_id: "external_id",
status: NotificationStatus.SUCCESS,
template: null,
})
)
expect(dbEntry).not.toHaveProperty("content")