(string) Str::uuid(), 'name' => 'Test User', 'email' => 'transfer+'.uniqid().'@example.com', ]); $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'), ], ]); $response->assertRedirect(); $this->assertDatabaseCount('transfers', 1); $this->assertDatabaseCount('transfer_files', 2); $this->assertDatabaseHas('qr_codes', ['type' => 'transfer', 'label' => 'Project assets']); $transfer = Transfer::first(); $this->assertNotNull($transfer->qr_code_id); $this->assertSame(14, $transfer->retention_days); } public function test_dashboard_requires_auth(): void { $this->get(route('transfer.dashboard'))->assertRedirect(); } }