Added spec methods for controller and model method for updating data