tests model & migration factory