X-Git-Url: https://git.squeep.com/?p=squeep-authentication-module;a=blobdiff_plain;f=test%2Flib%2Fauthenticator.js;fp=test%2Flib%2Fauthenticator.js;h=534fd02df14165d8029582ab6c3a816b24fbfe9a;hp=dea4a84427e2d9634b10e401a9084b1bea5370f9;hb=54ca04e330d14a12344ddc2b161c1d9b55bfd7d7;hpb=53ef948ea83106e82d55e60d6695a15e94bf725e diff --git a/test/lib/authenticator.js b/test/lib/authenticator.js index dea4a84..534fd02 100644 --- a/test/lib/authenticator.js +++ b/test/lib/authenticator.js @@ -60,18 +60,18 @@ describe('Authenticator', function () { it('covers success', async function () { const otpKey = '1234567890123456789012'; await authenticator.createIdentifier(dbCtx, identifier, credential, otpKey); - assert(authenticator.db.authenticationInsertIdentifier.called); + assert(authenticator.db.authenticationUpsert.called); }); it('covers failure', async function () { const expected = new Error('blah'); - await authenticator.db.authenticationInsertIdentifier.rejects(expected); + await authenticator.db.authenticationUpsert.rejects(expected); // assert.rejects was not happy to handle this for some reason try { await authenticator.createIdentifier(dbCtx, identifier, credential); assert.fail('no expecte exception'); } catch (e) { assert.deepStrictEqual(e, expected); - assert(authenticator.db.authenticationInsertIdentifier.called); + assert(authenticator.db.authenticationUpsert.called); assert(authenticator.logger.error.called); } });