fix
gitea/salix/pipeline/head This commit is unstable
Details
gitea/salix/pipeline/head This commit is unstable
Details
This commit is contained in:
parent
863977915e
commit
1e2f827233
|
@ -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`);
|
||||
});
|
||||
});
|
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue