Add min and max range values to date selector so a more accurate error message can be displayed when a date is out of the range

This commit is contained in:
leigh-mil
2019-10-03 16:12:49 -04:00
parent da6916b1a1
commit 07b3c68422
9 changed files with 126 additions and 20 deletions

View File

@@ -50,13 +50,13 @@ def test_clin_form_pop_dates_within_contract_dates():
assert not clin_form.validate()
assert (
translate(
"forms.task_order.pop_errors.start",
"forms.task_order.pop_errors.start_pre_contract",
{"date": CONTRACT_START_DATE.strftime("%b %d, %Y")},
)
) in clin_form.start_date.errors
assert (
translate(
"forms.task_order.pop_errors.end",
"forms.task_order.pop_errors.end_past_contract",
{"date": CONTRACT_END_DATE.strftime("%b %d, %Y")},
)
) in clin_form.end_date.errors