Commit Graph
2 Commits
Author SHA1 Message Date
objecttothis b40d1bb82b test: assert throttle_id return value in JobThrottleModel tests
Strengthen saveValue() assertions from assertTrue to assertSame(1, ...)
to verify the actual returned throttle ID rather than just truthiness.

- Covers both insert and update paths in testSaveValueInsertsWhenThrottleDoesNotExist
  and testSaveValueUpdatesWhenThrottleExists

Signed-off-by: objecttothis <17935339+objecttothis@users.noreply.github.com>
2026-09-17 15:43:40 +04:00
objecttothis f2b73fda36 test(jobs): add controller and model test coverage
Add PHPUnit tests for Jobs feature to lock in current
behavior before further changes.

- JobsControllerTest: covers /jobs index render, saveSettings
  validation (invalid mode, non-natural max_seconds) and
  success path, saveThrottles save/soft-delete-missing/invalid
  period handling, throttles partial render, and stub
  processAllJobs/processSelectedJobs endpoints
- JobThrottleModelTest: covers exists(), saveValue() insert vs
  update, getAll() excluding soft-deleted rows, and delete()
  soft-delete behavior

Signed-off-by: objecttothis <17935339+objecttothis@users.noreply.github.com>
2026-09-17 15:14:10 +04:00