Abri unparseable confirmed time fails loudly rather than silently booking all day 🟩

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Daniel Roth 2026-07-03 14:33:12 +00:00
parent eccc03f9f2
commit 2c660bdb5d

View file

@ -36,3 +36,12 @@ def test_a_confirmed_time_at_or_after_midday_books_the_afternoon_slot(
# Assert
assert slot == "PM"
@pytest.mark.parametrize("confirmed_time", ["half nine", "25:00", "9.30am"])
def test_an_unparseable_confirmed_time_fails_loudly_rather_than_booking_all_day(
confirmed_time: str,
) -> None:
# Act / Assert
with pytest.raises(ValueError):
slot_for_confirmed_time(confirmed_time)