added test for model.as_hash