AgileVentures / osra

Sponsor orphans in Syria & ensure basic life & education requirements for Syrian children
MIT License
20 stars 40 forks source link

Osra 447 export csv with filters #417

Closed develaper closed 8 years ago

develaper commented 8 years ago

Related to https://osraav.atlassian.net/browse/OSRA-447

b264 commented 8 years ago

The code looks good but I don't see any test that covers the essence of OSRA-447 which is to verify the export takes current filters into account. Maybe we can add a test or two to cover when filters are active?

develaper commented 8 years ago

To be completely honest, I wasn't very sure about how to assign values and test it. Any advice or improvement is welcome.

b264 commented 8 years ago

I would maybe add a test inside RSpec.describe Hq::OrphansController describe '#index' like specify "filter-CSV" and verifies one orphan's name exists in the output, and another's does not, based on whichever filter you put in the spec and two named orphans you create for the test, and also the same sort of thing for RSpec.describe Hq::SponsorsController. Currently I'm not seeing any tests on the controller CSV formats. (Did I miss them?) The view specifications look great and there are CSV specs on the models already.

b264 commented 8 years ago

:+1:

Maroo-b commented 8 years ago

@motasem-salem please review the updates ?