Update query and controller tests