api_on_rails
api_on_rails copied to clipboard
Product test may fail
Hi,
I've followed your tutorial and the Product test(should sort product by most recent) failed. When I debugged it the Products in fixtures had all same updated_at timestamp, so the fixture is not determining the order in that case.
`Product.recent.map(&:created_at)
[Sat, 31 Jul 2021 11:06:19.189008000 UTC +00:00, Sat, 31 Jul 2021 11:06:19.189008000 UTC +00:00, Sat, 31 Jul 2021 11:06:19.189008000 UTC +00:00]`
So I believe that adding the updated_at to fixtures will be a good point :)