fixed test by moving model behavior into model