refactored some controller tests