fix
gitea/salix/pipeline/head This commit is unstable Details

This commit is contained in:
Alex Moreno 2022-05-27 13:39:33 +02:00
parent 863977915e
commit 1e2f827233
2 changed files with 1 additions and 28 deletions

View File

@ -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`);
});
});

View File

@ -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',