diff --git a/src/constants.js b/src/constants.js index 112c44817..749fe6d4d 100644 --- a/src/constants.js +++ b/src/constants.js @@ -64,6 +64,6 @@ exports = module.exports = { FOOTER: '© %YEAR%   [Cloudron](https://cloudron.io)       [Forum ](https://forum.cloudron.io)', - VERSION: process.env.BOX_ENV === 'cloudron' ? fs.readFileSync(path.join(__dirname, '../VERSION'), 'utf8').trim() : '6.3.0-test' + VERSION: process.env.BOX_ENV === 'cloudron' ? fs.readFileSync(path.join(__dirname, '../VERSION'), 'utf8').trim() : '7.0.0-test' }; diff --git a/src/routes/test/common.js b/src/routes/test/common.js index f40b5e726..300729a87 100644 --- a/src/routes/test/common.js +++ b/src/routes/test/common.js @@ -81,6 +81,8 @@ async function setup() { // HACK to get a token for second user (passwords are generated and the user should have gotten a password setup link...) const token = await tokens.add({ identifier: user.id, clientId: 'test-client-id', expires: Date.now() + (60 * 60 * 1000), name: 'fromtest' }); user.token = token.accessToken; + + await settings._set(settings.CLOUDRON_TOKEN_KEY, exports.appstoreToken); // appstore token } async function cleanup() { diff --git a/src/routes/test/profile-test.js b/src/routes/test/profile-test.js index ccb4e809d..368245529 100644 --- a/src/routes/test/profile-test.js +++ b/src/routes/test/profile-test.js @@ -49,7 +49,7 @@ describe('Profile API', function () { expect(response.statusCode).to.equal(200); expect(response.body.username).to.equal(owner.username.toLowerCase()); expect(response.body.email).to.equal(owner.email.toLowerCase()); - expect(response.body.fallbackEmail).to.equal(owner.email.toLowerCase()); + expect(response.body.fallbackEmail).to.equal(''); expect(response.body.displayName).to.be.a('string'); expect(response.body.password).to.not.be.ok(); expect(response.body.salt).to.not.be.ok(); diff --git a/src/routes/test/users-test.js b/src/routes/test/users-test.js index a740c0fa6..df90367dd 100644 --- a/src/routes/test/users-test.js +++ b/src/routes/test/users-test.js @@ -185,11 +185,11 @@ describe('Users API', function () { it('sending succeeds', async function () { common.clearMailQueue(); - const response = await superagent.post(`${serverUrl}/api/v1/users/${user.id}/send_invite`) + const response = await superagent.post(`${serverUrl}/api/v1/users/${user.id}/send_invite_email`) .query({ access_token: owner.token }) - .send({}); + .send({ email: user.email }); - expect(response.statusCode).to.equal(200); + expect(response.statusCode).to.equal(202); await common.checkMails(1); }); }); diff --git a/src/test/apps-test.js b/src/test/apps-test.js index 4d751bee7..f66b2db3f 100644 --- a/src/test/apps-test.js +++ b/src/test/apps-test.js @@ -6,6 +6,7 @@ 'use strict'; const apps = require('../apps.js'), + AuditSource = require('../auditsource.js'), BoxError = require('../boxerror.js'), common = require('./common.js'), expect = require('expect.js'), @@ -284,7 +285,7 @@ describe('Apps', function () { }); it('can mark apps for reconfigure', async function () { - await apps.configureInstalledApps(); + await apps.configureInstalledApps(AuditSource.PLATFORM); const result = await apps.list(); expect(result[0].installationState).to.be(apps.ISTATE_PENDING_CONFIGURE); @@ -309,7 +310,7 @@ describe('Apps', function () { }); it('can mark apps for reconfigure', async function () { - await apps.restoreInstalledApps({}); + await apps.restoreInstalledApps({}, AuditSource.PLATFORM); const result = await apps.list(); expect(result[0].installationState).to.be(apps.ISTATE_PENDING_INSTALL); diff --git a/src/test/common.js b/src/test/common.js index 77b7092f5..475db5ec2 100644 --- a/src/test/common.js +++ b/src/test/common.js @@ -165,7 +165,6 @@ async function databaseSetup() { await settings._setApiServerOrigin(exports.mockApiServerOrigin); await settings.setDashboardLocation(exports.dashboardDomain, exports.dashboardFqdn); await settings.initCache(); - await blobs.initSecrets(); } async function domainSetup() {