Update tests to run assertions inside transaction