Fixed company unit test

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2021-12-02 16:43:03 -08:00
parent b0d2fc787a
commit 390e8a6cc3
2 changed files with 9 additions and 10 deletions

View file

@ -16,18 +16,17 @@ class UserFactory extends Factory
{
return [
'activated' => 1,
'address' => $this->faker->address,
'city' => $this->faker->city,
'address' => $this->faker->address(),
'city' => $this->faker->city(),
'company_id' => rand(1, 4),
'country' => $this->faker->country,
'country' => $this->faker->country(),
'department_id' => rand(1, 6),
'email' => $this->faker->safeEmail,
'employee_num' => $this->faker->numberBetween(3500, 35050),
'first_name' => $this->faker->firstName,
'jobtitle' => $this->faker->jobTitle,
'last_name' => $this->faker->lastName,
'locale' => $this->faker->locale,
'location_id' => rand(1, 5),
'first_name' => $this->faker->firstName(),
'jobtitle' => $this->faker->jobTitle(),
'last_name' => $this->faker->lastName(),
'locale' => $this->faker->locale(),
'notes' => 'Created by DB seeder',
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
'permissions' => '{"user":"0"}',

View file

@ -22,10 +22,10 @@ class CompanyTest extends BaseTest
public function testACompanyCanHaveUsers()
{
$company = Company::factory()->create();
User::factory()
$user = User::factory()
->create(
[
'company_id'=>$company->id
'company_id'=> $company->id
]
);