mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Added Google test user
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
7c77f4a697
commit
d648e9a01c
|
@ -65,6 +65,20 @@ class UserFactory extends Factory
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testAdmin()
|
||||||
|
{
|
||||||
|
return $this->state(function () {
|
||||||
|
return [
|
||||||
|
'first_name' => 'Alison',
|
||||||
|
'last_name' => 'Gianotto',
|
||||||
|
'username' => 'agianotto@grokability.com',
|
||||||
|
'avatar' => '2.jpg',
|
||||||
|
'email' => 'agianotto@grokability.com',
|
||||||
|
'permissions' => '{"superuser":"1"}',
|
||||||
|
];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public function superuser()
|
public function superuser()
|
||||||
{
|
{
|
||||||
return $this->state(function () {
|
return $this->state(function () {
|
||||||
|
|
|
@ -47,6 +47,13 @@ class UserSeeder extends Seeder
|
||||||
]))
|
]))
|
||||||
->create();
|
->create();
|
||||||
|
|
||||||
|
User::factory()->count(1)->testAdmin()
|
||||||
|
->state(new Sequence(fn($sequence) => [
|
||||||
|
'company_id' => $companyIds->random(),
|
||||||
|
'department_id' => $departmentIds->random(),
|
||||||
|
]))
|
||||||
|
->create();
|
||||||
|
|
||||||
User::factory()->count(3)->superuser()
|
User::factory()->count(3)->superuser()
|
||||||
->state(new Sequence(fn($sequence) => [
|
->state(new Sequence(fn($sequence) => [
|
||||||
'company_id' => $companyIds->random(),
|
'company_id' => $companyIds->random(),
|
||||||
|
|
Loading…
Reference in a new issue