-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TS-1416: Change to EndOfTenureDate validation so it can be on the StartOfTenureDate #31
Conversation
Hackney.Shared.Tenure/Boundary/Requests/Validation/TenureInformationValidatorWhenOnlyEndDate.cs
Outdated
Show resolved
Hide resolved
...ey.Shared.Tenure.Tests/Boundary/Validation/TenureInformationValidatorWhenOnlyEndDateTests.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR changes in here are fine, but I think I've missed what's not in this PR.
This could be an issue:
Lines 13 to 18 in 61af120
When(tenure => tenure.EndOfTenureDate != null, () => | |
{ | |
RuleFor(x => x.StartOfTenureDate) | |
.LessThan(x => x.EndOfTenureDate) | |
.WithErrorCode(ErrorCodes.TenureEndDate); | |
}); |
Hackney.Shared.Tenure/Boundary/Requests/Validation/TenureInformationValidatorWhenOnlyEndDate.cs
Show resolved
Hide resolved
…OfTenureDate and tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like it will be alright.
The effect of this is relaxed restriction on start/end date validation, which shouldn't break any API functionality contract-wise.
Of course, some tests on the Tenure API will need to be updated as well to match this new behaviour. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change in error code is fine. Just a string change.
Link to JIRA ticket
https://hackney.atlassian.net/browse/TS-1416
Describe this PR
What is the problem we're trying to solve
The BTA tool needs to be able to end a booking on the same day it starts. After convos with Housing and Finance (see ticket) we are now proceeding with such changes.
What changes have we introduced
Changes to validation + test
Also minor refactoring of surrounding tests as date setting was not super solid
Follow up actions after merging PR
Updating package version in consuming API + listener (for coherence)