Sha256: 26de32d08c98475c232417263a055f986a29e40bb7a87f134da89716b0ddc978

Contents?: true

Size: 738 Bytes

Versions: 54

Compression:

Stored size: 738 Bytes

Contents

root = exports ? window

require 'indemma/lib/record/validatable'

describe 'model #() validates_confirmation_of',  ->

  describe 'basic usage', ->
    model  = root.model
    person = null

    beforeEach ->
      person = model.call
        resource : 'person'
        password : String
        validates_confirmation_of: 'password'

    afterEach ->
      person.validators.length = 0

    describe '#validate', ->

      it 'should add error to record when fields does not match', ->
        arthur = person password: "domo", password_confirmation: "kun"
        arthur.valid
        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/src/spec/record/validations/confirmation_spec.coffee
ende-0.4.24 vendor/components/indefinido-indemma/src/spec/record/validations/confirmation_spec.coffee
ende-0.4.23 vendor/components/indefinido-indemma/src/spec/record/validations/confirmation_spec.coffee
ende-0.5.1 components/indefinido/indemma/master/src/spec/record/validations/confirmation_spec.coffee
ende-0.4.22 vendor/components/indefinido-indemma/src/spec/record/validations/confirmation_spec.coffee
ende-0.4.21 vendor/components/indefinido-indemma/src/spec/record/validations/confirmation_spec.coffee
ende-0.5.0 vendor/components/indefinido-indemma/src/spec/record/validations/confirmation_spec.coffee
ende-0.4.20 vendor/components/indefinido-indemma/src/spec/record/validations/confirmation_spec.coffee
ende-0.4.19 vendor/components/indefinido-indemma/src/spec/record/validations/confirmation_spec.coffee
ende-0.4.18 vendor/components/indefinido-indemma/src/spec/record/validations/confirmation_spec.coffee
ende-0.4.17 vendor/components/indefinido-indemma/src/spec/record/validations/confirmation_spec.coffee
ende-0.4.16 vendor/components/indefinido-indemma/src/spec/record/validations/confirmation_spec.coffee
ende-0.3.13 vendor/components/indefinido-indemma/src/spec/record/validations/confirmation_spec.coffee
ende-0.3.12 vendor/components/indefinido-indemma/src/spec/record/validations/confirmation_spec.coffee
ende-0.3.11 vendor/components/indefinido-indemma/src/spec/record/validations/confirmation_spec.coffee
ende-0.4.15 vendor/components/indefinido-indemma/src/spec/record/validations/confirmation_spec.coffee
ende-0.4.14 vendor/components/indefinido-indemma/src/spec/record/validations/confirmation_spec.coffee
ende-0.4.13 vendor/components/indefinido-indemma/src/spec/record/validations/confirmation_spec.coffee
ende-0.4.12 vendor/components/indefinido-indemma/src/spec/record/validations/confirmation_spec.coffee
ende-0.4.11 vendor/components/indefinido-indemma/src/spec/record/validations/confirmation_spec.coffee