Create a contact for portal tests

This commit is contained in:
Burak Çakırel 2020-01-07 17:30:58 +03:00
parent b83207d104
commit fb8c25dfb3

View File

@ -35,7 +35,7 @@ class TestCompany extends Seeder
private function createCompany()
{
$user = $this->dispatch(new CreateCompany([
$this->dispatch(new CreateCompany([
'name' => 'My Company',
'domain' => 'company.com',
'address' => 'New Street 1254',
@ -49,14 +49,12 @@ class TestCompany extends Seeder
],
]));
session(['company_id' => $user->companies()->pluck('id')->first()]);
$this->command->info('Test company created.');
}
public function createUser()
{
$this->dispatch(new CreateUser([
$user = $this->dispatch(new CreateUser([
'name' => 'Test User',
'email' => 'test@company.com',
'password' => '123456',
@ -66,6 +64,8 @@ class TestCompany extends Seeder
'enabled' => '1',
]));
session(['company_id' => $user->companies()->pluck('id')->first()]);
$this->command->info('Test user created.');
}