refactor back end test,failed because of new fixtures

This commit is contained in:
Bernat 2018-04-29 13:50:42 +02:00
parent f7b2bf9794
commit 3ff20d48d7
4 changed files with 4 additions and 4 deletions

View File

@ -4,6 +4,6 @@ describe('item filterItemTags()', () => {
it('should call the filterItemTags method', async() => { it('should call the filterItemTags method', async() => {
let [result] = await app.models.ItemTag.filterItemTags(1); let [result] = await app.models.ItemTag.filterItemTags(1);
expect(result.name).toEqual('Yellow'); expect(result.name).toEqual('Blue');
}); });
}); });

View File

@ -4,7 +4,7 @@ describe('ticket getTaxes()', () => {
it('should call the getTaxes method', done => { it('should call the getTaxes method', done => {
app.models.Ticket.getTaxes(1) app.models.Ticket.getTaxes(1)
.then(response => { .then(response => {
expect(response[0].tax).toEqual(1.05); expect(response[0].tax).toEqual(6.05);
done(); done();
}); });
}); });

View File

@ -4,7 +4,7 @@ describe('ticket getTotal()', () => {
it('should call the getTotal method and return the response', done => { it('should call the getTotal method and return the response', done => {
app.models.Ticket.getTotal(1) app.models.Ticket.getTotal(1)
.then(response => { .then(response => {
expect(response).toEqual(11.55); expect(response).toEqual(248.05);
done(); done();
}); });
}); });

View File

@ -78,7 +78,7 @@ module.exports = Self => {
where: { where: {
ticketFk: ticketFk ticketFk: ticketFk
}, },
order: 'concept ASC', order: 'itemFk ASC',
include: [{ include: [{
relation: 'item', relation: 'item',
scope: { scope: {