Fix: Perbaiki url panjang dan sesuaikan query detail penduduk#1554
Merged
Conversation
|
🔄 AI PR Review sedang antri di server...
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
issue #1550
Deskripsi
Mengubah url panjang ke id pada tombol detail penduduk di modul data -> penduduk. dengan kondisi pengaturan sinkronisasi database gabungan aktif.
Menambahkan unit test dan feature test untuk method
detailPenduduk()padaPendudukServicedanPendudukController::detail().Perubahan ini memastikan bahwa fungsionalitas yang diperbaiki pada commit
ac6f662(perbaiki url panjang dan sesuaikan query detail penduduk) sudah tercakup oleh pengujian.Perubahan
1. Unit Test —
tests/Unit/Services/PendudukServiceTest.phpMenambahkan 4 test case untuk
PendudukService::detailPenduduk():can get detail penduduk when API returns single objectattributes(response tunggal)can get detail penduduk when API returns arrayreturns null when penduduk not founddata: []returns null when API returns empty2. Feature Test —
tests/Feature/Controllers/Data/PendudukDetailControllerTest.php(file baru)Menambahkan 3 test case untuk
PendudukController::detail():detail aborts 404 when id is missingid→ expect HTTP 404detail aborts 404 when penduduk not foundidtidak valid → expect HTTP 404detail returns view with penduduk datadata.penduduk.gabungan.showdengan data pendudukCara Menjalankan
Referensi
ac6f662e3eae91891ef1898f0709542d8aeb9839