LocalOrbit / localorbit

Local Orbit is an open source web application and service that empowers food hubs to efficiently sell and distribute local food.
https://localorbit.com
MIT License
16 stars 11 forks source link

Fix delivery sorting on choose delivery page and orders list page #3491

Closed rbarreca closed 6 years ago

rbarreca commented 6 years ago

Fixes #3478, #3479

@thermistor any suggestions on specs for these two fixes?

  1. One is in controller but I'm not sure if it's proper in a controller spec to test for sorting of @deliveries? Or should that logic be moved into another class to test? If so, what kind of class...a Presenter???
  2. Other is to test orders index sorting, have any good example of that?
thermistor commented 6 years ago

@rbarreca for sorting, it's done for us by ransack, and we largely trust it to do its thing. If I was write a spec I would do it as feature/system spec, but I'm not sure it's worth it, I generally don't test that sort of thing.