Skip to content

Commit

Permalink
test: add unit test for get current ticket method
Browse files Browse the repository at this point in the history
  • Loading branch information
inaciogu committed Nov 29, 2023
1 parent 43d5d70 commit 428cc7b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/zendesk.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -449,4 +449,12 @@ describe('ZendeskClientBase', () => {
});
expect(await zendeskClientBase.authentication).toHaveBeenCalled();
});

it('should call get with correct params when get current ticket is called', async () => {
zendeskClientBase.get = jest.fn().mockResolvedValueOnce({
ticket: {}
});
await zendeskClientBase.getCurrentTicket();
expect(zendeskClientBase.get).toHaveBeenCalledWith('ticket');
});
});

0 comments on commit 428cc7b

Please sign in to comment.