Replace mailgun adapter with mock adapter (#7321)
This commit is contained in:
15
spec/support/MockMailAdapter/index.js
Normal file
15
spec/support/MockMailAdapter/index.js
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* A mock mail adapter for testing.
|
||||
*/
|
||||
class MockMailAdapter {
|
||||
constructor(options = {}) {
|
||||
if (options.throw) {
|
||||
throw 'MockMailAdapterConstructor';
|
||||
}
|
||||
}
|
||||
sendMail() {
|
||||
return 'MockMailAdapterSendMail';
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = MockMailAdapter;
|
||||
6
spec/support/MockMailAdapter/package.json
Normal file
6
spec/support/MockMailAdapter/package.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "mock-mail-adapter",
|
||||
"version": "1.0.0",
|
||||
"description": "Mock mail adapter for tests.",
|
||||
"main": "index.js"
|
||||
}
|
||||
Reference in New Issue
Block a user