esto se debe BORRAR
gitea/salix/pipeline/head Build queued... Details

This commit is contained in:
Vicent Llopis 2023-02-15 12:37:31 +01:00
parent df38f30f74
commit 443118a7ac
3 changed files with 6 additions and 3 deletions

View File

@ -34,6 +34,8 @@ async function test() {
const Jasmine = require('jasmine');
const jasmine = new Jasmine();
jasmine.seed('02137');
// jasmine.randomizeTests(false);
const SpecReporter = require('jasmine-spec-reporter').SpecReporter;
jasmine.addReporter(new SpecReporter({
@ -63,7 +65,7 @@ async function test() {
jasmine.loadConfig({
spec_dir: '.',
spec_files: backSpecs,
helpers: [],
helpers: []
});
await jasmine.execute();

View File

@ -44,7 +44,8 @@ module.exports = Self => {
try {
const invoiceOut = await Self.findById(id, null, myOptions);
const hasInvoicing = await models.Account.hasRole(userId, 'invoicing', myOptions);
console.log(hasInvoicing);
console.log(invoiceOut);
if (invoiceOut.hasPdf && !hasInvoicing)
throw new UserError(`You don't have enough privileges`);

View File

@ -66,7 +66,7 @@ describe('InvoiceOut filter()', () => {
const result = await models.InvoiceOut.filter(ctx, {id: invoiceOut.id}, options);
expect(result.length).toBeGreaterThanOrEqual(1);
expect(result.length).toEqual(1);
await tx.rollback();
} catch (e) {