Sha256: 3ab276b3c0a45151ee3a0a21fd40f3ce28433685ee6b70d3391ad45846afaae4
Contents?: true
Size: 922 Bytes
Versions: 8
Compression:
Stored size: 922 Bytes
Contents
var root; root = typeof exports !== "undefined" && exports !== null ? exports : window; require('indemma/lib/record/validatable'); describe('model #() validates_cpf_format', function() { return describe('basic usage', function() { var model; model = root.model; beforeEach(function() { return this.person = model.call({ resource: 'person', cpf: String, validates_cpf_format: 'cpf' }); }); afterEach(function() { return this.person.validators.length = 0; }); return describe('#validate', function() { return it('should add error to record when fields is in invalid format', function() { var arthur; arthur = this.person({ cpf: '871.95FRANGO-00' }); arthur.valid; return 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