Sha256: c3d603bb1122962de39ddde3a1b24668060bd1a9519ec8b207ff1c60e74b9cf3
Contents?: true
Size: 1.02 KB
Versions: 54
Compression:
Stored size: 1.02 KB
Contents
var root; root = typeof exports !== "undefined" && exports !== null ? exports : window; require('indemma/lib/record/validatable'); describe('model #() validates_confirmation_of', function() { return describe('basic usage', function() { var model, person; model = root.model; person = null; beforeEach(function() { return person = model.call({ resource: 'person', password: String, validates_confirmation_of: 'password' }); }); afterEach(function() { return person.validators.length = 0; }); return describe('#validate', function() { return it('should add error to record when fields does not match', function() { var arthur; arthur = person({ password: "domo", password_confirmation: "kun" }); arthur.valid; return arthur.errors.messages.should.have.deep.property('password_confirmation', 'O campo password não está de acordo com o campo password_confirmation.'); }); }); }); });
Version data entries
54 entries across 54 versions & 1 rubygems