Merge pull request #246 from matiu/feature/validation-header
feature: add "is email validated" header to emailplugin responses
This commit is contained in:
commit
1c7c39a104
File diff suppressed because it is too large
Load Diff
@ -387,9 +387,12 @@ describe('emailstore test', function() {
|
||||
plugin.retrieveDataByEmailAndPassphrase = sinon.stub();
|
||||
plugin.retrieveDataByEmailAndPassphrase.onFirstCall().callsArgWith(3, null, 'encrypted');
|
||||
response.send.onFirstCall().returnsThis();
|
||||
plugin.addValidationHeader = sinon.stub().callsArg(2);
|
||||
|
||||
plugin.retrieve(request, response);
|
||||
|
||||
request.header.calledOnce.should.equal(true);
|
||||
response.send.calledOnce.should.equal(true);
|
||||
|
||||
assert(request.header.firstCall.args[0] === 'authorization');
|
||||
assert(plugin.retrieveDataByEmailAndPassphrase.firstCall.args[0] === 'email');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user