tests model and controller