Sha256: 2db86bcc30e3167f79f5105eff8c4ef3ea76d63ca78cded83d1ec394bdd4a843

Contents?: true

Size: 837 Bytes

Versions: 5

Compression:

Stored size: 837 Bytes

Contents

require 'rspec/models/unidom/inventory/concerns/as_inventory_item_shared_examples'

describe Unidom::Inventory::SerializedInventoryItem, type: :model do

  before :each do
  end

  after :each do
  end

  context do

    model_attributes = {
      stored_id:     SecureRandom.uuid,
      stored_type:   'Unidom::Inventory::Stored::Mock',
      store_id:      SecureRandom.uuid,
      store_type:    'Unidom::Inventory::Store::Mock',
      lot_id:        SecureRandom.uuid,
      serial_number: '123456789012'
    }

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

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

    it_behaves_like 'Unidom::Inventory::Concerns::AsInventoryItem', model_attributes

  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
unidom-inventory-2.0.1 lib/rspec/models/unidom/inventory/serialized_inventory_item_spec.rb
unidom-inventory-2.0 lib/rspec/models/unidom/inventory/serialized_inventory_item_spec.rb
unidom-inventory-1.0.5 lib/rspec/models/unidom/inventory/serialized_inventory_item_spec.rb
unidom-inventory-1.0.4 lib/rspec/models/unidom/inventory/serialized_inventory_item_spec.rb
unidom-inventory-1.0.3 lib/rspec/models/unidom/inventory/serialized_inventory_item_spec.rb