Skip to content

Commit

Permalink
fix: 6
Browse files Browse the repository at this point in the history
  • Loading branch information
whiitex committed May 19, 2024
1 parent 682b5b8 commit d7dd6c3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions api/src/timeslots/timeslots.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
} from '@hkrecruitment/shared';
import { RecruitmentSession } from 'src/recruitment-session/recruitment-session.entity';
import { Availability } from 'src/availability/availability.entity';
import { createApp, getAccessToken, getSub } from 'test/app.e2e-spec';
import { createApp, getAccessToken } from 'test/app.e2e-spec';

describe('TimeslotsController', () => {
let app: INestApplication;
Expand Down Expand Up @@ -1220,14 +1220,17 @@ describe('TimeslotsController', () => {
start: '2024-05-19T15:00:00.000Z',
},
];
return await request(app.getHttpServer())
await request(app.getHttpServer())
.get('/timeslots')
.set('Authorization', `Bearer ${newMemberToken}`)
.expect(200)
.expect((res) => {
expect(res.body).toBeInstanceOf(Array);
expect(res.body).toEqual(expected);
});

const availableTimeSlots =
await timeSlotsService.findAvailableTimeSlots();
expect(availableTimeSlots).toEqual(expected);
});
});
});

0 comments on commit d7dd6c3

Please sign in to comment.