Tell us what’s happening:
My application appears to work perfectly, but one test still fails.
Specifically the one that states:
" You can POST
to /api/users/:_id/exercises
with form data description
, duration
, and optionally date
. If no date is supplied, the current date will be used. The response returned will be the user object with the exercise fields added."
The response object I built returns all attributes in the requested format at the specified endpoint.
Keep in mind that I’m providing the url shown below for the tests and all other pass, just not this one.
A quick look at the data inserted by the unit tests shows most records with the date set to “Mon Jan 01 1990”.
I thought it could be the format within the input, but it maps correctly, i.e., my app recognizes “2000-01-30” as “Mon Jan 30 2000”, for instance.
What am I missing? Could there be an issue with timezones here? Or could the tests be at fault?
Logically, if no date is provided, it inserts the present day (also testable via the url below).
As a suggestion, if any admins end up seeing this: I think the test results should specify what was being tested that failed. I understand that if you show the data used in a test people can hard code outcomes, but knowing the name of the test or something would help a lot.
Edit: Removed a link that wasn’t useful
Git Repository:
Your project link(s)
solution: Exercise Tracker
Challenge: Exercise Tracker