From 37a1947fc51d96127f52cb35f44254b446e880a3 Mon Sep 17 00:00:00 2001 From: Fabien O'Carroll Date: Tue, 2 Jun 2020 16:20:57 +0200 Subject: [PATCH] Fixed broken regression tests from #11861 no-issue The config is now a class and the context of `this` was not bound --- core/server/services/members/api.js | 2 +- test/regression/migrations/migration_spec.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/server/services/members/api.js b/core/server/services/members/api.js index b59d5d31c6..02f4a2e617 100644 --- a/core/server/services/members/api.js +++ b/core/server/services/members/api.js @@ -15,7 +15,7 @@ function createApiInstance(config) { const membersApiInstance = MembersApi({ tokenConfig: config.getTokenConfig(), auth: { - getSigninURL: config.getSigninURL, + getSigninURL: config.getSigninURL.bind(config), allowSelfSignup: config.getAllowSelfSignup(), secret: config.getAuthSecret() }, diff --git a/test/regression/migrations/migration_spec.js b/test/regression/migrations/migration_spec.js index 4b6e3e3052..f0dcb1f7c2 100644 --- a/test/regression/migrations/migration_spec.js +++ b/test/regression/migrations/migration_spec.js @@ -264,7 +264,7 @@ describe('Database Migration (special functions)', function () { result.roles.at(7).get('name').should.eql('Scheduler Integration'); // Permissions - result.permissions.length.should.eql(74); + result.permissions.length.should.eql(75); result.permissions.toJSON().should.be.CompletePermissions(); }); });