Sha256: 3ce37607c31848e0c364c4201681489a666c4fa5d77232505343ae5fe1a3fc13

Contents?: true

Size: 538 Bytes

Versions: 58

Compression:

Stored size: 538 Bytes

Contents

root = exports ? window

require 'indemma/lib/record/validatable'

describe 'model #() validates presence of',  ->

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

    beforeEach ->
      person = model.call
        resource  : 'person'
        name      : String
        belongs_to: 'corporation'
        validates_presence_of: 'name'

    afterEach ->
      person.validators.length = 0

    describe '#validate', ->

      it 'should add error to record when required field is empty (null, undefined or \'\')'

Version data entries

58 entries across 58 versions & 1 rubygems

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