Sha256: 6447cc116bac8cec4d44021a1d016afc6cb13e62a98721602aa2e288b22220db

Contents?: true

Size: 1.61 KB

Versions: 1

Compression:

Stored size: 1.61 KB

Contents

describe Unidom::Shipment::Shipment, type: :model do

  before :each do
  end

  after :each do
  end

  context do

    model_attributes = {
      sender_party_id:        SecureRandom.uuid,
      sender_party_type:      'Unidom::Shipment::SenderParty::Mock',
      sender_agent_id:        SecureRandom.uuid,
      sender_agent_type:      'Unidom::Shipment::SenderAgent::Mock',
      sender_location_id:     SecureRandom.uuid,
      sender_location_type:   'Unidom::Shipment::SenderLocation::Mock',
      sender_contact_id:      SecureRandom.uuid,
      sender_contact_type:    'Unidom::Shipment::SenderContact::Mock',
      receiver_party_id:      SecureRandom.uuid,
      receiver_party_type:    'Unidom::Shipment::ReceiverParty::Mock',
      receiver_agent_id:      SecureRandom.uuid,
      receiver_agent_type:    'Unidom::Shipment::ReceiverAgent::Mock',
      receiver_location_id:   SecureRandom.uuid,
      receiver_location_type: 'Unidom::Shipment::ReceiverLocation::Mock',
      receiver_contact_id:    SecureRandom.uuid,
      receiver_contact_type:  'Unidom::Shipment::ReceiverContact::Mock',
      conveyance_code:        'CSSP',
      estimated_ready_on:     Date.current+2.days,
      estimated_shipped_on:   Date.current+3.days,
      estimated_arrived_on:   Date.current+9.days,
      last_cancellable_at:    Time.now+2.days,
      shipped_at:             Time.now+3.days,
      received_at:            Time.now+9.days,
      cancelled_at:           nil,
      estimated_amount:       1_000.00,
      actual_amount:          1_050.00
    }

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

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
unidom-shipment-0.7 lib/rspec/models/unidom/shipment/shipment_spec.rb