Skip to content

Commit

Permalink
debug: test 3
Browse files Browse the repository at this point in the history
  • Loading branch information
whiitex committed May 19, 2024
1 parent 542e5dc commit 527c65c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
4 changes: 4 additions & 0 deletions api/src/mocks/requests.http
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
GET http://localhost:3000/v1/timeslots/
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Imc4aFdBRTB0U00tX3JJVUR0WElNMyJ9.eyJlbWFpbCI6InBhc3F1YWxlLmJpYW5jb0Boa25wb2xpdG8ub3JnIiwiaXNzIjoiaHR0cHM6Ly9kZXYtYzhyb29jZGw3NjNsbDVxZi5ldS5hdXRoMC5jb20vIiwic3ViIjoiZ29vZ2xlLW9hdXRoMnwxMDYyMjgyMTU0MzYxNTk5ODcwNTEiLCJhdWQiOlsiaHR0cDovL2hrcmVjcnVpdG1lbnQub3JnIiwiaHR0cHM6Ly9kZXYtYzhyb29jZGw3NjNsbDVxZi5ldS5hdXRoMC5jb20vdXNlcmluZm8iXSwiaWF0IjoxNzE2MTEzNTk3LCJleHAiOjE3MTYxOTk5OTcsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZW1haWwiLCJhenAiOiJaekNWd2R2eUJOUWZKc3R1ZUJPcVh3TW1jazZCa0d4NiJ9.PyyW67LJIWc9NbMibzvzfxlY0Pe1YTsZVsV2--ckBQ5hfYsCKqCUi6aIjmiliz_uZO5qdPAsZ7FYNOtOI8fGhPt9QfKSqA166D-CZWnpuwE4cM_EjbpCoHRRQ49r2Ycv_ZnzVXrO6zCyEVZYgx-USGiuBnRcKbIPDJCS4Tc9bcmklcUdq4ujAPtSDdmid9jcVN3DM5eLtXAQuYIUho3G3NRVuKlUnoNIsK16yrKtx5kgOHKuUP6dFYExpp2ViB4oZV-v_linCsXZEE5x-7GBMntJAGtenCs-1uihB-OGLYJY_6fPsRG2rgw5Fl8Ax0Ioc8LeXkwlJ2L-MO1ms-r8uQ

###
GET http://localhost:3000/v1/availabilities/
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Imc4aFdBRTB0U00tX3JJVUR0WElNMyJ9.eyJlbWFpbCI6InBhc3F1YWxlLmJpYW5jb0Boa25wb2xpdG8ub3JnIiwiaXNzIjoiaHR0cHM6Ly9kZXYtYzhyb29jZGw3NjNsbDVxZi5ldS5hdXRoMC5jb20vIiwic3ViIjoiZ29vZ2xlLW9hdXRoMnwxMDYyMjgyMTU0MzYxNTk5ODcwNTEiLCJhdWQiOlsiaHR0cDovL2hrcmVjcnVpdG1lbnQub3JnIiwiaHR0cHM6Ly9kZXYtYzhyb29jZGw3NjNsbDVxZi5ldS5hdXRoMC5jb20vdXNlcmluZm8iXSwiaWF0IjoxNzE2MTEzNTk3LCJleHAiOjE3MTYxOTk5OTcsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZW1haWwiLCJhenAiOiJaekNWd2R2eUJOUWZKc3R1ZUJPcVh3TW1jazZCa0d4NiJ9.PyyW67LJIWc9NbMibzvzfxlY0Pe1YTsZVsV2--ckBQ5hfYsCKqCUi6aIjmiliz_uZO5qdPAsZ7FYNOtOI8fGhPt9QfKSqA166D-CZWnpuwE4cM_EjbpCoHRRQ49r2Ycv_ZnzVXrO6zCyEVZYgx-USGiuBnRcKbIPDJCS4Tc9bcmklcUdq4ujAPtSDdmid9jcVN3DM5eLtXAQuYIUho3G3NRVuKlUnoNIsK16yrKtx5kgOHKuUP6dFYExpp2ViB4oZV-v_linCsXZEE5x-7GBMntJAGtenCs-1uihB-OGLYJY_6fPsRG2rgw5Fl8Ax0Ioc8LeXkwlJ2L-MO1ms-r8uQ
16 changes: 14 additions & 2 deletions api/src/timeslots/timeslots.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -910,10 +910,22 @@ describe('TimeslotsController', () => {
expect(allAvailabilities).toHaveLength(mockAvailability.length);
});

it('DEBUG: check format of an abailability', async () => {
const availability = await availabilityService.findById(1);
expect(availability).toBeDefined();
expect(availability).toHaveProperty('id', 1);
expect(availability).toHaveProperty('state');
expect(availability).toHaveProperty('lastModified');
expect(availability).toHaveProperty('timeSlot');
expect(availability).toHaveProperty('user');
expect(availability).toEqual(mockAvailability[0]);

});

it('DEBUG: check availabilities for timeslot having id 71 & 73', async () => {
const allAvailabilities = await availabilityService.listAvailabilities();
const av71 = allAvailabilities.filter((a) => a.timeSlotId === 71);
const av73 = allAvailabilities.filter((a) => a.timeSlotId === 73);
const av71 = allAvailabilities.filter((a) => a.timeSlot.id === 71);
const av73 = allAvailabilities.filter((a) => a.timeSlot.id === 73);
expect(av71).toHaveLength(4);
expect(av73).toHaveLength(2);
});
Expand Down

0 comments on commit 527c65c

Please sign in to comment.