Add sample tests. Change userUid argument to be properly userId. Do some safe checks in search.
This commit is contained in:
committed by
Paula Quispe
parent
9fa4c1750a
commit
17e6ef3441
@@ -7,7 +7,14 @@ $factory->define(\ProcessMaker\Model\Delegation::class, function(Faker $faker) {
|
||||
$app = factory(\ProcessMaker\Model\Application::class)->create();
|
||||
$process = \ProcessMaker\Model\Process::where('PRO_UID', $app->PRO_UID)->first();
|
||||
$task = $process->tasks->first();
|
||||
$user = \ProcessMaker\Model\User::all()->random();
|
||||
|
||||
// Grab a user if random
|
||||
$users = \ProcessMaker\Model\User::all();
|
||||
if(!count($users)) {
|
||||
$user = factory(\ProcessMaker\Model\User::class)->create();
|
||||
} else{
|
||||
$user = $users->random();
|
||||
}
|
||||
return [
|
||||
'APP_UID' => $app->APP_UID,
|
||||
'DEL_INDEX' => 1,
|
||||
|
||||
Reference in New Issue
Block a user