Create a contact for portal tests
This commit is contained in:
parent
b83207d104
commit
fb8c25dfb3
@ -35,7 +35,7 @@ class TestCompany extends Seeder
|
|||||||
|
|
||||||
private function createCompany()
|
private function createCompany()
|
||||||
{
|
{
|
||||||
$user = $this->dispatch(new CreateCompany([
|
$this->dispatch(new CreateCompany([
|
||||||
'name' => 'My Company',
|
'name' => 'My Company',
|
||||||
'domain' => 'company.com',
|
'domain' => 'company.com',
|
||||||
'address' => 'New Street 1254',
|
'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.');
|
$this->command->info('Test company created.');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createUser()
|
public function createUser()
|
||||||
{
|
{
|
||||||
$this->dispatch(new CreateUser([
|
$user = $this->dispatch(new CreateUser([
|
||||||
'name' => 'Test User',
|
'name' => 'Test User',
|
||||||
'email' => 'test@company.com',
|
'email' => 'test@company.com',
|
||||||
'password' => '123456',
|
'password' => '123456',
|
||||||
@ -66,6 +64,8 @@ class TestCompany extends Seeder
|
|||||||
'enabled' => '1',
|
'enabled' => '1',
|
||||||
]));
|
]));
|
||||||
|
|
||||||
|
session(['company_id' => $user->companies()->pluck('id')->first()]);
|
||||||
|
|
||||||
$this->command->info('Test user created.');
|
$this->command->info('Test user created.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user