feat: unit + feature tests (51 passing), SQLite test env, bug fixes#130
Open
kaliclawp wants to merge 2 commits intoPhilhil:masterfrom
Open
feat: unit + feature tests (51 passing), SQLite test env, bug fixes#130kaliclawp wants to merge 2 commits intoPhilhil:masterfrom
kaliclawp wants to merge 2 commits intoPhilhil:masterfrom
Conversation
Test files added:
- tests/Unit/UserModelTest.php (role checks, qualification assignment)
- tests/Feature/AuthTest.php (login, logout, registration, spam honeypot)
- tests/Feature/ServiceManagementTest.php (service CRUD, position subscribe/authorize)
- tests/Feature/TrainingManagementTest.php (training CRUD, training editor role)
- tests/Feature/HolidayTest.php (holiday CRUD, service/training blocking, shortcuts)
Infrastructure changes:
- phpunit.xml: switch to SQLite :memory: for tests, set APP_KEY, IS_DEMO=true,
disable Telescope, captcha bypass env vars
- .env.testing: generated APP_KEY added
- config/backup.php: fallback email for spatie/laravel-backup (null-safe)
App fixes discovered via tests:
- Replace all DB::raw('CURDATE()') with now()->toDateString() (SQLite compat)
- Migration 2019_05_29: skip dropForeign by name on SQLite
- RegisterController: bypass captcha in testing env
- Qualification: add client_id to fillable
- Client_user: add isTrainingEditor, isStatisticEditor, approved to fillable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test files added:
Infrastructure changes:
App fixes discovered via tests: