Status check for Create\Update\Delete Comment doesn't work

Hey everyone!

Seems the status check doesn’t work correctly for cerate\update\delete comment tickets. All unit tests are passed, also I even failed those labs and copied answers to the app.

Please share a screenshot of running the related unit tests. The ones for Get Comments are also of interest as most of the time the issue is related to the fact that comments are not sorted correctly.

I dropped the database and reloaded sample data again, and seems unit tests also stopped to work

Anyway, previously I fixed items manually in DB, and tests are passed. But status check didn’t work

Also, BTW Web App doesn’t send an Authorization header if you try to send a comment through it. It’ not required to pass the lab, but it would be helpful to check it during development.

Unit tests exist to verify that your code is correct and matches the requirements. You DO NOT alter the sample data (nor unit tests) to make unit tests succeed with code that does not produce the appropriate result. No wonder

You code did not work at first. Unit tests worked because you tweak the data.

What you have to do is restore the original data and work on your code until unaltered unit test works with unaltered data.

See Ticket: Create/Update Comments saving data in database - #2 by steevej


@111975, did you find the issue with your code? If so please share your findings so that others know how to avoid the same pitfall.

1 Like