Skip to content

Commit

Permalink
Fix integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksTeresh committed Dec 18, 2024
1 parent 10450a9 commit d5bd774
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/server/routes/programManagement.integration-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ describe('program-managements router', () => {
describe('GET /api/program-managements', () => {
it('should return 200', async () => {
const response = await request
.get('/api/program-managements')
.get('/api/program-managements?limitToEditorsPrograms=true')
.set({ uid: user1.id, hygroupcn: 'hy-employees' })
expect(response.status).toEqual(200)
expect(response.body).toMatchObject([])
Expand Down Expand Up @@ -293,7 +293,7 @@ describe('program-managements router', () => {
describe('GET /api/program-managements', () => {
it('should return 200 and only the programs that teacher is managing', async () => {
const response = await request
.get('/api/program-managements')
.get('/api/program-managements?limitToEditorsPrograms=true')
.set({ uid: user1.id, hygroupcn: 'hy-employees' })
expect(response.status).toEqual(200)
expect(response.body).toIncludeSameMembers([
Expand Down
2 changes: 1 addition & 1 deletion src/server/routes/thesisHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ export const handleThesisCreationEmail = async (
newThesis: ThesisData,
actionUser: UserType
) => {
if (newThesis.approvers.length) {
if (newThesis.approvers?.length) {
const approverTargets = newThesis.approvers
.filter((approver) => approver.email)
.map((approver) => approver.email)
Expand Down

0 comments on commit d5bd774

Please sign in to comment.