Closed develaper closed 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?
To be completely honest, I wasn't very sure about how to assign values and test it. Any advice or improvement is welcome.
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.
:+1:
@motasem-salem please review the updates ?
Related to https://osraav.atlassian.net/browse/OSRA-447