Skip to content

Chapter 6 on Test sort productsΒ #37

@oscartzgz

Description

@oscartzgz

test 'should sort product by most recent' do
# we will touch some products to update them
products(:two).touch
products(:one)

I implemented the test code and code on model but test fails becuase doesn't return products in expected order, also anyone can explain me what does those two last lines? I understand that the first line updates the datetime on "updated_at" atrribute, but second line, what does?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions