writing tests for model validations