3830-ticket_sale #927

Merged
carlosjr merged 9 commits from 3830-ticket_sale into dev 2022-04-13 09:30:49 +00:00
2 changed files with 13 additions and 0 deletions
Showing only changes of commit c5efc17fe9 - Show all commits

View File

@ -262,6 +262,19 @@ describe('Ticket Component vnTicketDescriptorMenu', () => {
});
});
describe('refundAll()', () => {
it('should make a query and show a go to ticket.card.sale', () => {
vicent marked this conversation as resolved Outdated

show a go?

show a go?
jest.spyOn(controller.$state, 'go').mockReturnValue('ok');
vicent marked this conversation as resolved Outdated

do you need this spy to return a value?

do you need this spy to return a value?
const expectedParams = {ticketId: ticket.id};
$httpBackend.expect('POST', `Sales/refund`, expectedParams).respond({ticketId: 16});
controller.refundAll();
$httpBackend.flush();
expect(controller.$state.go).toHaveBeenCalledWith('ticket.card.sale', {id: {ticketId: ticket.id}});
});
});
describe('showSMSDialog()', () => {
it('should set the destionationFk and destination properties and then call the sms open() method', () => {
controller.$.sms = {open: () => {}};