Refactor SupplierTest to use permission setup function and enhance phone number validation tests
- Introduced `giveSupplierPermissions` function to streamline user permission setup for supplier tests. - Updated all supplier-related tests to utilize the new permission setup function. - Enhanced phone number validation tests to accept various formats and special characters. - Removed redundant tests related to unsupported phone number formats. - Consolidated tests for supplier creation and updates to improve readability and maintainability.
This commit is contained in:
parent
7aa802445a
commit
f562f2babe
@ -17,7 +17,11 @@ public function handle(MessageLogged $event): void
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$developers = User::role('Developer')->where('is_active', true)->get();
|
try {
|
||||||
|
$developers = User::role('Developer')->where('is_active', true)->get();
|
||||||
|
} catch (\Throwable) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ($developers->isEmpty()) {
|
if ($developers->isEmpty()) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user