mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 21:54:14 -08:00
Merge pull request #13635 from marcusmoore/bug/sc-23715
Added unique() to some factory properties
This commit is contained in:
commit
46981da400
|
@ -22,7 +22,7 @@ class CompanyFactory extends Factory
|
|||
public function definition()
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->company(),
|
||||
'name' => $this->faker->unique()->company(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ class CustomFieldFactory extends Factory
|
|||
public function definition()
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->catchPhrase(),
|
||||
'name' => $this->faker->unique()->catchPhrase(),
|
||||
'format' => '',
|
||||
'element' => 'text',
|
||||
'auto_add_to_fieldsets' => '0',
|
||||
|
|
|
@ -22,7 +22,7 @@ class CustomFieldsetFactory extends Factory
|
|||
public function definition()
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->catchPhrase(),
|
||||
'name' => $this->faker->unique()->catchPhrase(),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ class DepreciationFactory extends Factory
|
|||
public function definition()
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->catchPhrase(),
|
||||
'name' => $this->faker->unique()->catchPhrase(),
|
||||
'user_id' => User::factory()->superuser(),
|
||||
'months' => 36,
|
||||
];
|
||||
|
|
|
@ -23,7 +23,7 @@ class ManufacturerFactory extends Factory
|
|||
public function definition()
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->company(),
|
||||
'name' => $this->faker->unique()->company(),
|
||||
'user_id' => User::factory()->superuser(),
|
||||
'support_phone' => $this->faker->phoneNumber(),
|
||||
'url' => $this->faker->url(),
|
||||
|
|
|
@ -33,7 +33,7 @@ class UserFactory extends Factory
|
|||
'permissions' => '{}',
|
||||
'phone' => $this->faker->phoneNumber(),
|
||||
'state' => $this->faker->stateAbbr(),
|
||||
'username' => $this->faker->username(),
|
||||
'username' => $this->faker->unique()->username(),
|
||||
'zip' => $this->faker->postcode(),
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue