Fixed active record tests