test for for_model method