feat(qma): route heavy equipment update in unit management directly to transfer form

This commit is contained in:
Ray1111-aa
2026-10-21 14:39:34 +07:00
parent 4eb713aafb
commit c510991ff0
5 changed files with 36 additions and 6 deletions
+12
View File
@@ -292,4 +292,16 @@ class QmaUnitTransferTest extends TestCase
$response->assertRedirect(route('qma.unit_transfers.index'));
$this->assertDatabaseMissing('unit_transfers', ['id' => $transfer->id]);
}
/**
* Form pembuatan transfer unit otomatis memilih alat berat jika parameter vehicle_id disertakan.
*/
public function test_create_transfer_form_preselects_heavy_unit_when_vehicle_id_provided(): void
{
$response = $this->actingAs($this->qmaAdmin)->get(route('qma.unit_transfers.create', ['vehicle_id' => $this->heavyEquipment->id]));
$response->assertOk();
$response->assertSee('value="' . $this->heavyEquipment->id . '"', false);
$response->assertSee('selected', false);
}
}