Sha256: e805a0d19ae69b83599277b716c971cfa8fb1a8cea68688c86a32551e8a24a68
Contents?: true
Size: 744 Bytes
Versions: 8
Compression:
Stored size: 744 Bytes
Contents
root = exports ? window require 'indemma/lib/record/validatable' describe 'model #() validates_cpf_format', -> describe 'basic usage', -> model = root.model beforeEach -> @person = model.call resource : 'person' cpf : String validates_cpf_format: 'cpf' afterEach -> # Clear validators from resource @person.validators.length = 0 describe '#validate', -> it 'should add error to record when fields is in invalid format', -> arthur = @person cpf: '871.95FRANGO-00' arthur.valid # TODO figure out why the heck the validators aren't being reset arthur.errors.messages.should.have.deep.property 'cpf', "O campo cpf não está válido."
Version data entries
8 entries across 8 versions & 1 rubygems