16 lines
486 B
JavaScript
16 lines
486 B
JavaScript
|
const app = require(`${servicesDir}/ticket/server/server`);
|
||
|
|
||
|
describe('ticket getSalesPersonMana()', () => {
|
||
|
it('should get the mana of a salesperson of a given ticket', async() => {
|
||
|
let mana = await app.models.Ticket.getSalesPersonMana(1);
|
||
|
|
||
|
expect(mana).toEqual(330);
|
||
|
});
|
||
|
|
||
|
it('should return 0 if the given ticket does not exists', async() => {
|
||
|
let mana = await app.models.Ticket.getSalesPersonMana(20);
|
||
|
|
||
|
expect(mana).toEqual(0);
|
||
|
});
|
||
|
});
|