lbraun / thanksgiving

💵 - A personal philanthropy tracking web app for individuals who want to manage and stimulate their giving
https://thanksgivingapp.herokuapp.com/
3 stars 4 forks source link

Sort recipients index in descending order by date created #59

Closed qubist closed 4 years ago

qubist commented 4 years ago

Used https://stackoverflow.com/questions/12764765/ to learn how sorting like this works.

I didn't add a test for this because there wasn't a recipients_controller test there already and I didn't know how to add one.

Closes #56

qubist commented 4 years ago

Happy to add tests with help if you think it's needed @lbraun

qubist commented 4 years ago

Oh I found where the tests for this are: in recipients_spec.rb in the features folder. Looks like it doesn't test order.

qubist commented 4 years ago

Added a test for order :)) figured it out on my own :))

lbraun commented 4 years ago

Nice!!! Yeah, feature tests (a.k.a. system tests, integration tests) test everything in a sense because they actually render the page and test what's displayed, so all the pieces (model, view, and controller) have to be working for them to pass.

The downside is that they are slow and not very exact. But I tend to write a lot more feature tests than controller tests.

lbraun commented 4 years ago

Excellent @qubist , thank you!!