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

Version Path
ende-0.4.25 vendor/components/indefinido-indemma/spec/record/validations/confirmation_spec.js
ende-0.4.24 vendor/components/indefinido-indemma/spec/record/validations/confirmation_spec.js
ende-0.4.23 vendor/components/indefinido-indemma/spec/record/validations/confirmation_spec.js
ende-0.5.1 components/indefinido/indemma/master/spec/record/validations/confirmation_spec.js
ende-0.4.22 vendor/components/indefinido-indemma/spec/record/validations/confirmation_spec.js
ende-0.4.21 vendor/components/indefinido-indemma/spec/record/validations/confirmation_spec.js
ende-0.5.0 vendor/components/indefinido-indemma/spec/record/validations/confirmation_spec.js
ende-0.4.20 vendor/components/indefinido-indemma/spec/record/validations/confirmation_spec.js
ende-0.4.19 vendor/components/indefinido-indemma/spec/record/validations/confirmation_spec.js
ende-0.4.18 vendor/components/indefinido-indemma/spec/record/validations/confirmation_spec.js
ende-0.4.17 vendor/components/indefinido-indemma/spec/record/validations/confirmation_spec.js
ende-0.4.16 vendor/components/indefinido-indemma/spec/record/validations/confirmation_spec.js
ende-0.3.13 vendor/components/indefinido-indemma/spec/record/validations/confirmation_spec.js
ende-0.3.12 vendor/components/indefinido-indemma/spec/record/validations/confirmation_spec.js
ende-0.3.11 vendor/components/indefinido-indemma/spec/record/validations/confirmation_spec.js
ende-0.4.15 vendor/components/indefinido-indemma/spec/record/validations/confirmation_spec.js
ende-0.4.14 vendor/components/indefinido-indemma/spec/record/validations/confirmation_spec.js
ende-0.4.13 vendor/components/indefinido-indemma/spec/record/validations/confirmation_spec.js
ende-0.4.12 vendor/components/indefinido-indemma/spec/record/validations/confirmation_spec.js
ende-0.4.11 vendor/components/indefinido-indemma/spec/record/validations/confirmation_spec.js