Open cc-prj-review-alf opened 5 years ago
Thanks for your suggestions here. This was actually passing before I added the 2nd route.param statement in timesheetRouter and menuItemRouter, but then the last test (I can't remember it now) was failing. Maybe that could be something you could look at.
This one stumped me but I believe the issue is narrowed down to the
timesheetMw.js
file andmenu-items-MW.js
file. We are expecting empty arrays when employee '3' is fetch viaGET
/api/employees/:employeeId/timesheets
but it returns an array with one object:I see that you have the SQL statement correct:
select * from MenuItem where menu_id = $id
I checked your 'seed.js' file incase there was a user with this ID and timesheets passing through. Did not see this in the seed. This same behavior was shown with the menuItem test. In any case, maybe some logic is needed her that can check for and empty array or return an empty array if an employee is not employed at the org anymore? This one stumped me pretty hard too.