refactors some controller tests