2018-08-10 14:31:44 +00:00
|
|
|
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);
|
|
|
|
|
2018-09-04 12:52:38 +00:00
|
|
|
expect(mana).toEqual(470);
|
2018-08-10 14:31:44 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should return 0 if the given ticket does not exists', async() => {
|
|
|
|
let mana = await app.models.Ticket.getSalesPersonMana(20);
|
|
|
|
|
|
|
|
expect(mana).toEqual(0);
|
|
|
|
});
|
|
|
|
});
|