Skip to content

Commit

Permalink
updated response body, fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaHinman committed May 9, 2024
1 parent ab03c39 commit 9281e97
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
5 changes: 4 additions & 1 deletion src/sprints/sprints.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ export class SprintsService {
select: {
id: true,
number: true,
soloProjectDeadline: true,
certificateIssueDate: true,
showcasePublishDate: true,
startDate: true,
endDate: true,
sprints: {
Expand All @@ -135,7 +138,7 @@ export class SprintsService {
//copy teamVoyage endDate to voyage object
teamSprintDates.voyage.endDate = teamSprintDates.endDate;
delete teamSprintDates.endDate;
return teamSprintDates;
return teamSprintDates.voyage;
}

async getMeetingById(meetingId: number) {
Expand Down
22 changes: 9 additions & 13 deletions test/sprints.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,19 +107,15 @@ describe("Sprints Controller (e2e)", () => {
expect(res.body).toEqual(
expect.objectContaining({
id: expect.any(Number),
name: expect.any(String),
voyage: expect.objectContaining({
id: expect.any(Number),
number: expect.any(String),
sprints: expect.arrayContaining([
expect.objectContaining({
id: expect.any(Number),
number: expect.any(Number),
startDate: expect.any(String),
endDate: expect.any(String),
}),
]),
}),
number: expect.any(String),
sprints: expect.arrayContaining([
expect.objectContaining({
id: expect.any(Number),
number: expect.any(Number),
startDate: expect.any(String),
endDate: expect.any(String),
}),
]),
}),
);
});
Expand Down

0 comments on commit 9281e97

Please sign in to comment.