fixed tests
This commit is contained in:
@ -4,7 +4,7 @@ namespace Database\Seeds;
|
||||
|
||||
use App\Abstracts\Model;
|
||||
use App\Jobs\Auth\CreateUser;
|
||||
use App\Models\Common\Company;
|
||||
use App\Jobs\Common\CreateCompany;
|
||||
use App\Traits\Jobs;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
@ -32,28 +32,17 @@ class TestCompany extends Seeder
|
||||
|
||||
private function createCompany()
|
||||
{
|
||||
Company::create([
|
||||
'domain' => 'test.com',
|
||||
]);
|
||||
|
||||
setting()->setExtraColumns(['company_id' => '1']);
|
||||
setting()->set([
|
||||
'company.name' => 'Test Company',
|
||||
'company.email' => 'test@company.com',
|
||||
'company.address' => 'New Street 1254',
|
||||
'localisation.financial_start' => '01-01',
|
||||
'default.currency' => 'USD',
|
||||
'default.account' => '1',
|
||||
'default.payment_method' => 'offline-payments.cash.1',
|
||||
'schedule.bill_days' => '10,5,3,1',
|
||||
'schedule.invoice_days' => '1,3,5,10',
|
||||
'schedule.send_invoice_reminder' => '1',
|
||||
'schedule.send_bill_reminder' => '1',
|
||||
'wizard.completed' => '1',
|
||||
'contact.type.customer' => 'customer',
|
||||
'contact.type.vendor' => 'vendor',
|
||||
]);
|
||||
setting()->save();
|
||||
$this->dispatch(new CreateCompany([
|
||||
'name' => 'My Company',
|
||||
'domain' => 'company.com',
|
||||
'address' => 'New Street 1254',
|
||||
'currency' => 'USD',
|
||||
'locale' => 'en-GB',
|
||||
'enabled' => '1',
|
||||
'settings' => [
|
||||
'wizard.completed' => '1',
|
||||
],
|
||||
]));
|
||||
|
||||
$this->command->info('Test company created.');
|
||||
}
|
||||
@ -61,7 +50,7 @@ class TestCompany extends Seeder
|
||||
public function createUser()
|
||||
{
|
||||
$this->dispatch(new CreateUser([
|
||||
'name' => 'Test',
|
||||
'name' => 'Test User',
|
||||
'email' => 'test@company.com',
|
||||
'password' => '123456',
|
||||
'locale' => 'en-GB',
|
||||
|
Reference in New Issue
Block a user