mirror of
https://github.com/archtechx/tenancy.git
synced 2026-05-06 16:24:03 +00:00
Add valid password assertion
This commit is contained in:
parent
587f347b64
commit
099a666dbc
1 changed files with 10 additions and 0 deletions
|
|
@ -620,6 +620,16 @@ test('database managers validate parameters that cannot be bound', function ($dr
|
||||||
expect(fn () => $manager->createUser($tenantWithInvalidPassword->database()))
|
expect(fn () => $manager->createUser($tenantWithInvalidPassword->database()))
|
||||||
->toThrow(InvalidArgumentException::class, 'Forbidden character');
|
->toThrow(InvalidArgumentException::class, 'Forbidden character');
|
||||||
|
|
||||||
|
// Special characters are allowed in password
|
||||||
|
$tenantWithValidPassword = Tenant::make([
|
||||||
|
'tenancy_db_name' => 'valid_database_name890',
|
||||||
|
'tenancy_db_username' => 'valid_USERNAME',
|
||||||
|
'tenancy_db_password' => "]pa$$ ;word",
|
||||||
|
]);
|
||||||
|
|
||||||
|
expect(fn () => $manager->createUser($tenantWithValidPassword->database()))
|
||||||
|
->not()->toThrow(InvalidArgumentException::class, 'Forbidden character');
|
||||||
|
|
||||||
$tenantWithNullDbParameters = Tenant::make([
|
$tenantWithNullDbParameters = Tenant::make([
|
||||||
'tenancy_db_name' => null,
|
'tenancy_db_name' => null,
|
||||||
'tenancy_db_username' => null,
|
'tenancy_db_username' => null,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue