refactr: update test
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
5f2424dc44
commit
c5efc17fe9
|
@ -262,6 +262,19 @@ describe('Ticket Component vnTicketDescriptorMenu', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('refundAll()', () => {
|
||||||
|
it('should make a query and show a go to ticket.card.sale', () => {
|
||||||
|
jest.spyOn(controller.$state, 'go').mockReturnValue('ok');
|
||||||
|
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()', () => {
|
describe('showSMSDialog()', () => {
|
||||||
it('should set the destionationFk and destination properties and then call the sms open() method', () => {
|
it('should set the destionationFk and destination properties and then call the sms open() method', () => {
|
||||||
controller.$.sms = {open: () => {}};
|
controller.$.sms = {open: () => {}};
|
||||||
|
|
Loading…
Reference in New Issue