api_on_rails icon indicating copy to clipboard operation
api_on_rails copied to clipboard

Product test may fail

Open PabloMD opened this issue 3 years ago • 0 comments

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 :)

PabloMD avatar Jul 31 '21 11:07 PabloMD