Skip to content

Add tests for ongoing time entry check on manual creation - #65

Open
travismolick wants to merge 3 commits into
mainfrom
test/time-entry-ongoing-guard
Open

travismolick wants to merge 3 commits into
mainfrom
test/time-entry-ongoing-guard

Conversation

@travismolick

Copy link
Copy Markdown
Contributor

Adds regression coverage for the ongoing time entry check in VolunteerController::storeTimeEntry, which #64 briefly broke and then fixed in a08bbda.

  • Clocking a volunteer in twice with no stop must return 409 on the second request, leaving exactly one ongoing entry. This fails on bed9ab4 (the second request returns 200) and passes on a08bbda.
  • Creating an entry with an explicit stop while another entry is ongoing must still succeed.

The tests always send an explicit start just before now(), mirroring the real clock-in UI. They use RefreshDatabase per-file, since it's disabled globally.

@travismolick travismolick added blocked Another issue needs to be completed before this one documentation Improvements or additions to documentation and removed blocked Another issue needs to be completed before this one labels Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants