Sha256: 40aab00bce6e77804f0d04f40b7e2c01f5d7e07306541b7dcc50859e6b18db4e
Contents?: true
Size: 759 Bytes
Versions: 50
Compression:
Stored size: 759 Bytes
Contents
root = exports ? window require 'indemma/lib/record/validatable' describe 'model #() validates_cpf_format', -> describe 'basic usage', -> model = root.model person = null 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.943.417-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
50 entries across 50 versions & 1 rubygems