Skip to content

Commit

Permalink
Changes test method to matching method for other spots
Browse files Browse the repository at this point in the history
  • Loading branch information
coconutcraig committed Nov 19, 2018
1 parent 22d24ce commit 408c4ae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/resources/appointment.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ it('can book an appointment with the minimum required parameters', async () => {
.book();

expect(mockAxios.post).toHaveBeenCalledTimes(1);
expect(mockAxios.post).toBeCalledWith('appointments', {
expect(mockAxios.post).toHaveBeenCalledWith('appointments', {
data: {
attributes: {
location_id: 1,
Expand Down Expand Up @@ -161,7 +161,7 @@ it('can book an appointment with all available parameters', async () => {
.notify(notification)
.book();

expect(mockAxios.post).toBeCalledWith('appointments', {
expect(mockAxios.post).toHaveBeenCalledWith('appointments', {
data: {
attributes: {
location_id: 1,
Expand Down Expand Up @@ -229,7 +229,7 @@ it('can retrieve matching appointments using a given set of matchers', async ()
await resource.matching(matchers).get();

expect(mockAxios.get).toHaveBeenCalledTimes(1);
expect(mockAxios.get).toBeCalledWith('appointments', {
expect(mockAxios.get).toHaveBeenCalledWith('appointments', {
params: matchers,
})
});
Expand All @@ -240,5 +240,5 @@ it('can cancel the given appointment for the given attendee', async () => {
await resource.cancel(1, 2);

expect(mockAxios.delete).toHaveBeenCalledTimes(1);
expect(mockAxios.delete).toBeCalledWith('appointments/1/2');
expect(mockAxios.delete).toHaveBeenCalledWith('appointments/1/2');
});

0 comments on commit 408c4ae

Please sign in to comment.