/ticket/getSalesPersonMana.js Backend unit tests
This commit is contained in:
parent
06a3f0b6bc
commit
ac90bb3b18
|
@ -0,0 +1,15 @@
|
|||
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);
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue