Skip to content

test(admin): cover the remaining #214 filters and lock the staff rows to a secret-free shape - #315

Open
Boy-Offi9 wants to merge 1 commit into
Delivery-Plus0:devfrom
Boy-Offi9:feat/admin-read-tests
Open

Boy-Offi9 wants to merge 1 commit into
Delivery-Plus0:devfrom
Boy-Offi9:feat/admin-read-tests

Conversation

@Boy-Offi9

Copy link
Copy Markdown
Member

Summary — 1 commit, 2 files, tests only (no production code touched). Fills the two #214 acceptance-criteria gaps left after #311–#313: the remaining list filters had no tests, and the staff DTO secret-guard existed only for users.

What changes

  • driver-service admin-drivers.service.spec.ts: the status and verificationStatus filters are asserted to pass straight through to findForAdmin, and a fixed-shape test locks StaffDriverRow to exactly its twelve documented fields (no nationalIdHash, the entity's secret-hash never reaches the JSON).
  • restaurant-service admin-restaurants.service.spec.ts: the approvalStatus and status filters are asserted straight through, a partial area request carries near: undefined, and a fixed-shape test locks StaffRestaurantRow to exactly its fourteen documented fields (no taxCardNumber, no commercialRegistrationNumber).
  • The users service already had both tests; the three services now satisfy "tests for each filter" and "staff DTOs are snapshot-tested to prove no secret fields" the same way.

Closes #214 (the routes themselves landed in #311, #312 and #313).

Testing

  • npm test --workspace=@food-delivery/driver-service — 165 passed (was 163).
  • npm test --workspace=@food-delivery/restaurant-service — 103 passed (was 101).
  • npm test --workspace=@food-delivery/user-service — 10 passed, unchanged.
  • Lint on both touched services: 0 errors, no new warnings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: admin read APIs for users, drivers and restaurants

1 participant