Skip to content

Commit

Permalink
fix: null-since duration rejected by validator
Browse files Browse the repository at this point in the history
  • Loading branch information
Tennessine699 committed Sep 12, 2024
1 parent ab9a64b commit db1c2d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions integration_tests/handler/contest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,8 @@ func TestEditContest(t *testing.T) {
mockdata.ContestID3(),
schema.EditContestRequest{
Duration: &schema.Duration{
// DurationのValidationで落とされるのでSinceも埋める
Since: mockdata.CloneMockContests()[2].Since,
Until: &until, // Untilはnilにすると「未定」に変更される
},
},
Expand Down
5 changes: 5 additions & 0 deletions integration_tests/handler/project_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,11 @@ func TestEditProject(t *testing.T) {
mockdata.ProjectID2(),
schema.EditProjectRequest{
Duration: &schema.YearWithSemesterDuration{
// DurationのValidationで落とされるのでSinceも埋める
Since: schema.YearWithSemester{
Year: mockdata.CloneMockProjects()[1].SinceYear,
Semester: schema.Semester(mockdata.CloneMockProjects()[1].SinceSemester),
},
Until: duration.Until, // Untilはnilにすると「未定」に変更される
},
},
Expand Down

0 comments on commit db1c2d4

Please sign in to comment.