});
}); // checkOTP
+ describe('updateOTPKey', function () {
+ let dbCtx, otpKey;
+ beforeEach(function () {
+ dbCtx = {};
+ otpKey = 'CDBGB3U3B2ILECQORMINGGSZN7LXY565';
+ });
+ it('covers success', async function () {
+ await authenticator.updateOTPKey(dbCtx, identifier, otpKey);
+ assert(authenticator.db.authenticationUpdateOTPKey.called);
+ });
+ it('covers failure', async function () {
+ authenticator.db.authenticationUpdateOTPKey.rejects();
+ assert.rejects(authenticator.updateOTPKey(dbCtx, identifier, otpKey));
+ });
+ }); // updateOTPKey
+
describe('sessionCheck', function () {
let req, res, loginPath, required, profilesAllowed;
beforeEach(function () {