refactors controller tests