Localize verification messages with koa-locales

This commit is contained in:
Thomas Oberndörfer
2019-06-13 12:14:51 +02:00
parent 9064089482
commit 3367f08647
13 changed files with 151 additions and 74 deletions

View File

@@ -34,8 +34,9 @@ describe('Koa App (HTTP Server) Integration Tests', function() {
emailParams = params;
return Boolean(params.nonce);
});
sandbox.spy(templates, 'verifyKey').withArgs(paramMatcher);
sandbox.spy(templates, 'verifyRemove').withArgs(paramMatcher);
const ctxMatcher = sinon.match(ctx => Boolean(ctx));
sandbox.spy(templates, 'verifyKey').withArgs(ctxMatcher, paramMatcher);
sandbox.spy(templates, 'verifyRemove').withArgs(ctxMatcher, paramMatcher);
sendEmailStub = sandbox.stub().returns(Promise.resolve({response: '250'}));
sendEmailStub.withArgs(sinon.match(sendOptions => sendOptions.to.address === primaryEmail));