Refactor some controller tests to use factories.