matai-2022 / gardenz

Empowering community gardens in New Zealand
0 stars 1 forks source link

Add tests for GET /api/v1/gardens/:id in gardens.js #101

Closed ptranny closed 2 years ago

ptranny commented 2 years ago

Added tests to check users and admin were receiving different data about volunteers. Deleted duplicate tests, and tests that were no longer relevant. Refactored mock data so that each test received a fresh copy of the data. In the route itself, we removed the logic for making a deep clone of the data that came back from the database because no other functions access this data so it's unnecessary to clone it.

saia-maka commented 2 years ago

Pair-reviewed by Saia & Jingjing - tests look good, great job!

clementine-smart commented 2 years ago

Nice work, and great initiative deleting redundant/duplicate tests!