23 lines
587 B
PHP
23 lines
587 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use App\Models\Tenant;
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
it('creates ad_wallets with zero balance and frozen', function () {
|
|
$tenant = Tenant::factory()->create();
|
|
|
|
DB::table('ad_wallets')->insert([
|
|
'tenant_id' => $tenant->id,
|
|
'balance_rub' => '0.00',
|
|
'frozen_rub' => '0.00',
|
|
'created_at' => now(),
|
|
'updated_at' => now(),
|
|
]);
|
|
|
|
$row = DB::table('ad_wallets')->where('tenant_id', $tenant->id)->first();
|
|
expect($row->balance_rub)->toBe('0.00')
|
|
->and($row->frozen_rub)->toBe('0.00');
|
|
});
|