From 1e2f827233b3fd1cc65ffab7e7ee623913269b99 Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 27 May 2022 13:39:33 +0200 Subject: [PATCH] fix --- .../methods/mdbVersion/specs/upload.spec.js | 27 ------------------- modules/mdb/back/methods/mdbVersion/upload.js | 2 +- 2 files changed, 1 insertion(+), 28 deletions(-) delete mode 100644 modules/mdb/back/methods/mdbVersion/specs/upload.spec.js diff --git a/modules/mdb/back/methods/mdbVersion/specs/upload.spec.js b/modules/mdb/back/methods/mdbVersion/specs/upload.spec.js deleted file mode 100644 index f62886760c..0000000000 --- a/modules/mdb/back/methods/mdbVersion/specs/upload.spec.js +++ /dev/null @@ -1,27 +0,0 @@ -const models = require('vn-loopback/server/server').models; - -fdescribe('Mdb upload()', () => { - it(`should return an error for a user without enough privileges`, async() => { - const tx = await models.MdbVersion.beginTransaction({}); - - let error; - - try { - const options = {transaction: tx}; - const currentUserId = 1101; - const appName = 'tpv'; - const newVersion = '123'; - const branch = 'test'; - const ctx = {req: {accessToken: {userId: currentUserId}}}; - - await models.MdbVersion.upload(ctx, appName, newVersion, branch, options); - - await tx.rollback(); - } catch (e) { - await tx.rollback(); - error = e; - } - - expect(error.message).toEqual(`You don't have enough privileges`); - }); -}); diff --git a/modules/mdb/back/methods/mdbVersion/upload.js b/modules/mdb/back/methods/mdbVersion/upload.js index 904f9f1d9b..2109f2b4fb 100644 --- a/modules/mdb/back/methods/mdbVersion/upload.js +++ b/modules/mdb/back/methods/mdbVersion/upload.js @@ -3,7 +3,7 @@ const path = require('path'); module.exports = Self => { Self.remoteMethodCtx('upload', { - description: 'Returns a list of tag values', + description: 'Upload and attach a access file', accepts: [ { arg: 'appName',