mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Fixed company unit test
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
b0d2fc787a
commit
390e8a6cc3
|
@ -16,18 +16,17 @@ class UserFactory extends Factory
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'activated' => 1,
|
'activated' => 1,
|
||||||
'address' => $this->faker->address,
|
'address' => $this->faker->address(),
|
||||||
'city' => $this->faker->city,
|
'city' => $this->faker->city(),
|
||||||
'company_id' => rand(1, 4),
|
'company_id' => rand(1, 4),
|
||||||
'country' => $this->faker->country,
|
'country' => $this->faker->country(),
|
||||||
'department_id' => rand(1, 6),
|
'department_id' => rand(1, 6),
|
||||||
'email' => $this->faker->safeEmail,
|
'email' => $this->faker->safeEmail,
|
||||||
'employee_num' => $this->faker->numberBetween(3500, 35050),
|
'employee_num' => $this->faker->numberBetween(3500, 35050),
|
||||||
'first_name' => $this->faker->firstName,
|
'first_name' => $this->faker->firstName(),
|
||||||
'jobtitle' => $this->faker->jobTitle,
|
'jobtitle' => $this->faker->jobTitle(),
|
||||||
'last_name' => $this->faker->lastName,
|
'last_name' => $this->faker->lastName(),
|
||||||
'locale' => $this->faker->locale,
|
'locale' => $this->faker->locale(),
|
||||||
'location_id' => rand(1, 5),
|
|
||||||
'notes' => 'Created by DB seeder',
|
'notes' => 'Created by DB seeder',
|
||||||
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
|
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
|
||||||
'permissions' => '{"user":"0"}',
|
'permissions' => '{"user":"0"}',
|
||||||
|
|
|
@ -22,10 +22,10 @@ class CompanyTest extends BaseTest
|
||||||
public function testACompanyCanHaveUsers()
|
public function testACompanyCanHaveUsers()
|
||||||
{
|
{
|
||||||
$company = Company::factory()->create();
|
$company = Company::factory()->create();
|
||||||
User::factory()
|
$user = User::factory()
|
||||||
->create(
|
->create(
|
||||||
[
|
[
|
||||||
'company_id'=>$company->id
|
'company_id'=> $company->id
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue