Add tests for CohortsController writing cohorts to the database