Bill transfer storage monthly with a 15-day grace period before deletion.
Deploy Ladill Transfer / deploy (push) Successful in 51s

Files stay available while wallet renewals succeed each month. Failed renewals
keep files for TRANSFER_GRACE_PERIOD_DAYS (default 15) before automatic cleanup.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-06-08 12:28:33 +00:00
co-authored by Cursor
parent 65b634bb0b
commit 311b5b40bb
23 changed files with 502 additions and 56 deletions
+5 -2
View File
@@ -8,15 +8,18 @@ use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Http\UploadedFile;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
use Tests\Concerns\FakesTransferBilling;
use Tests\TestCase;
class TransferTest extends TestCase
{
use FakesTransferBilling;
use RefreshDatabase;
public function test_authenticated_user_can_create_transfer_with_files(): void
{
Storage::fake('qr');
$this->fakeTransferBillingApi();
$user = User::create([
'public_id' => (string) Str::uuid(),
@@ -27,7 +30,6 @@ class TransferTest extends TestCase
$response = $this->actingAs($user)->post(route('transfer.transfers.store'), [
'title' => 'Project assets',
'message' => 'Here are the files.',
'retention_days' => 14,
'files' => [
UploadedFile::fake()->create('brief.pdf', 100, 'application/pdf'),
UploadedFile::fake()->create('photo.jpg', 50, 'image/jpeg'),
@@ -41,7 +43,8 @@ class TransferTest extends TestCase
$transfer = Transfer::first();
$this->assertNotNull($transfer->qr_code_id);
$this->assertSame(14, $transfer->retention_days);
$this->assertNotNull($transfer->paid_until);
$this->assertTrue($transfer->paid_until->isFuture());
}
public function test_dashboard_requires_auth(): void