factory in tests
This commit is contained in:
@ -3,7 +3,6 @@
|
||||
use App\Models\Auth\User;
|
||||
use App\Models\Banking\Transaction;
|
||||
use Faker\Generator as Faker;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
|
||||
$user = User::first();
|
||||
$company = $user->companies()->first();
|
||||
@ -11,8 +10,6 @@ $company = $user->companies()->first();
|
||||
$factory->define(Transaction::class, function (Faker $faker) use ($company) {
|
||||
setting()->setExtraColumns(['company_id' => $company->id]);
|
||||
|
||||
$attachment = UploadedFile::fake()->create('image.jpg');
|
||||
|
||||
return [
|
||||
'company_id' => $company->id,
|
||||
'type' => 'income',
|
||||
@ -25,7 +22,6 @@ $factory->define(Transaction::class, function (Faker $faker) use ($company) {
|
||||
'category_id' => $company->categories()->type('income')->pluck('id')->first(),
|
||||
'reference' => $faker->text(5),
|
||||
'payment_method' => setting('default.payment_method'),
|
||||
//'attachment' => $attachment,
|
||||
];
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user