mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-19 16:42:17 +03:00
1f6b2b4d5e
refs https://github.com/TryGhost/Toolbox/issues/499 - Outgoing emails have been a weak point of Ghost's stability recently. The concept of "emailMockReceiver" similarly to "webhookMockReceiver", allows to test side-effects like outgoing emails. - This is a first iteration which should lay groundwork for testing all outgoing emails in the future - The change adds a new concept of "email mock receiver" which is very similar to how the "webhook mock receiver" works. The email mock receiver exposes two methods to record and verify snapshots: - matchHTMLSnapshot - records and verifies only the HTML content of the outgoint email - matchMetadataSnapshot - records and verifies all the non-HTML properties sent along an email content, e.g.: to address, plaintext, subject, etc. - What's missing is matching content based on dynamic content like dates, links with JWT tokens, etc. |
||
---|---|---|
.. | ||
__snapshots__ | ||
authentication.test.js | ||
db.test.js | ||
identities.test.js | ||
images.test.js | ||
members-importer.test.js | ||
members-signin-url.test.js | ||
notifications.test.js | ||
pages.test.js | ||
posts.test.js | ||
redirects.test.js | ||
schedules.test.js | ||
settings.test.js | ||
slack.test.js | ||
update-user-last-seen.test.js | ||
users.test.js | ||
utils.js | ||
webhooks.test.js |