Skip to content

Conversation

PabloMD
Copy link

@PabloMD PabloMD commented Jul 31, 2021

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

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 :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant