Fix feature tests. Lack of seeding led to SQL exceptions
Registration lacked slug column
Logic in registration to make business slugs unique
Fixed resulting bug in navigation that didn't pull slug in correctly on duplicate slugs entries
Admin password is nullable as it only pertains to paid subs
Runtime improvements in User model
A unit test for makeSlugUnique method
We should make sure we run tests before each PR.
Especially after database changes. It's easy to break the authentication system.
To run all the tests
php artisan test
To run a specific test
php artisan test --filter NameOfTheTestFile
Feature tests will check a larger set of code.
Unit tests target a small specific unit of code. A class or function.
Tests shouldn't commit data changes to a database permanently.
Additional packages have been pulled in with composer so we can run tests more quickly.
I haven't tested these parallel tests thoroughly so if something fails and you don't know why
then try running sequentially.
Running tests in parallel after your composer install
php artisan test --parallel --processes=4
Note: if you want to make a test yourself, copy a feature/unit test we have. The artisan commands
for default feature and unit tests don't work properly with our project.
Unit tests imports a TestCase class that was giving me inaccurate results.
Neither test was set up to seed the database.
We should make sure we run tests before each PR. Especially after database changes. It's easy to break the authentication system.
To run all the tests
To run a specific test
Feature tests will check a larger set of code. Unit tests target a small specific unit of code. A class or function.
Tests shouldn't commit data changes to a database permanently.
Additional packages have been pulled in with composer so we can run tests more quickly. I haven't tested these parallel tests thoroughly so if something fails and you don't know why then try running sequentially.
Running tests in parallel after your
composer install
Note: if you want to make a test yourself, copy a feature/unit test we have. The artisan commands for default feature and unit tests don't work properly with our project. Unit tests imports a TestCase class that was giving me inaccurate results. Neither test was set up to seed the database.