Skip to content

Commit

Permalink
fix(import-api): correct validation merger year
Browse files Browse the repository at this point in the history
  • Loading branch information
ArneD committed Jan 14, 2025
1 parent 7ba3a08 commit c48329b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public sealed class ProposeMergersRequestValidator : AbstractValidator<ProposeMe
public ProposeMergersRequestValidator(LegacyContext legacyContext, ImportContext importContext)
{
RuleFor(request => request.MergerYear)
.GreaterThan(DateTime.Now.Year)
.GreaterThanOrEqualTo(DateTime.Now.Year)
.DependentRules(() =>
{
RuleFor(request => request.MergerYear)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public async Task GivenValidRequestWithNewDestinationMunicipality_ThenMunicipali

var request = new ProposeMergersRequest
{
MergerYear = 2025,
MergerYear = DateTime.Now.Year + 1,
Municipalities =
[
new ProposeMergerRequest
Expand Down Expand Up @@ -147,7 +147,7 @@ public async Task GivenValidRequestWithExistingDestinationMunicipality_ThenMunic

var request = new ProposeMergersRequest
{
MergerYear = 2025,
MergerYear = DateTime.Now.Year + 1,
Municipalities =
[
new ProposeMergerRequest
Expand Down

0 comments on commit c48329b

Please sign in to comment.