added test for before_save callback