diff --git a/server/tests/notifications/test_email.py b/server/tests/notifications/test_email.py index 389b69eb28..3e3def0ca4 100644 --- a/server/tests/notifications/test_email.py +++ b/server/tests/notifications/test_email.py @@ -11,6 +11,7 @@ MaintainerCreateAccountNotificationPayload, MaintainerDonationReceivedNotificationPayload, MaintainerNewPaidSubscriptionNotificationPayload, + MaintainerNewProductSaleNotificationPayload, MaintainerPledgeConfirmationPendingNotificationPayload, MaintainerPledgeCreatedNotificationPayload, MaintainerPledgedIssueConfirmationPendingNotificationPayload, @@ -388,6 +389,19 @@ async def test_MaintainerNewPaidSubscriptionNotification() -> None: await check_diff(n.render()) +@pytest.mark.asyncio +@pytest.mark.skip_db_asserts +async def test_MaintainerNewProductSaleNotification() -> None: + n = MaintainerNewProductSaleNotificationPayload( + customer_name="birk@polar.sh", + product_name="My Awesome Digital Product", + product_price_amount=500, + organization_name="myorg", + ) + + await check_diff(n.render()) + + @pytest.mark.asyncio @pytest.mark.skip_db_asserts async def test_MaintainerCreateAccountNotificationPayload() -> None: diff --git a/server/tests/notifications/testdata/test_MaintainerNewPaidSubscriptionNotification.html b/server/tests/notifications/testdata/test_MaintainerNewPaidSubscriptionNotification.html index 254061bd80..94ee64335f 100644 --- a/server/tests/notifications/testdata/test_MaintainerNewPaidSubscriptionNotification.html +++ b/server/tests/notifications/testdata/test_MaintainerNewPaidSubscriptionNotification.html @@ -1,4 +1,4 @@ -John Doe is now subscribing to My Paid Tier ($5) +Congrats! You have a new subscriber ($5/month)!
diff --git a/server/tests/notifications/testdata/test_MaintainerNewProductSaleNotification.html b/server/tests/notifications/testdata/test_MaintainerNewProductSaleNotification.html new file mode 100644 index 0000000000..299511511b --- /dev/null +++ b/server/tests/notifications/testdata/test_MaintainerNewProductSaleNotification.html @@ -0,0 +1,557 @@ +Congrats! You've made a new sale ($5)! +
+ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file