Sha256: 2782bfba2de60513ebacd2ee348b3c8025d38ccd9d3a4125420ad8b174c1d3f1

Contents?: true

Size: 810 Bytes

Versions: 3

Compression:

Stored size: 810 Bytes

Contents

describe Unidom::Dictionary::DictionaryItem, type: :model do

  before :each do
  end

  after :each do
  end

  context do

    model_attributes = {
      dictionary_code: 'ZZZZ',
      code:            'OTHR',
      value:           'other'
    }

    it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes

    it_behaves_like 'validates text', model_attributes, :dictionary_code,
      length: described_class.columns_hash['dictionary_code'].limit..described_class.columns_hash['dictionary_code'].limit

    it_behaves_like 'validates text', model_attributes, :code,
      length: 1..described_class.columns_hash['code'].limit, allow_blank: true

    it_behaves_like 'validates text', model_attributes, :value,
      length: 2..described_class.columns_hash['value'].limit

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
unidom-dictionary-1.0 lib/rspec/models/unidom/dictionary/dictionary_item_spec.rb
unidom-dictionary-0.3.3 lib/rspec/models/unidom/dictionary/dictionary_item_spec.rb
unidom-dictionary-0.3.2 lib/rspec/models/unidom/dictionary/dictionary_item_spec.rb