From 9c093c6beb76a2fbe0f0ee388d28d5b3cd4905b3 Mon Sep 17 00:00:00 2001 From: Fabien O'Carroll Date: Fri, 18 Sep 2020 13:21:46 +0100 Subject: [PATCH] Fixed MagicLink tests no-issue The JWTTokenProvider is now exported from the index --- ghost/magic-link/test/index.test.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ghost/magic-link/test/index.test.js b/ghost/magic-link/test/index.test.js index 7416337593..2ae5c59357 100644 --- a/ghost/magic-link/test/index.test.js +++ b/ghost/magic-link/test/index.test.js @@ -1,7 +1,6 @@ const should = require('should'); const sinon = require('sinon'); const MagicLink = require('../'); -const JWTTokenProvider = require('../JWTTokenProvider'); const crypto = require('crypto'); const sandbox = sinon.createSandbox(); @@ -15,7 +14,7 @@ describe('MagicLink', function () { describe('#sendMagicLink', function () { it('Sends an email to the user with a link generated from getSigninURL(token, type)', async function () { const options = { - tokenProvider: new JWTTokenProvider(secret), + tokenProvider: new MagicLink.JWTTokenProvider(secret), getSigninURL: sandbox.stub().returns('FAKEURL'), getText: sandbox.stub().returns('SOMETEXT'), getHTML: sandbox.stub().returns('SOMEHTML'),