unidom-shipment 0.7.2 → 0.7.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a7b0c73a706a0af1a8601522106f90ec7c0d84b5
4
- data.tar.gz: c000081d698cedaf92296937814025bfeff08b07
3
+ metadata.gz: af1c56a6bed650fa4c33c73f298ed1a86a9fdda5
4
+ data.tar.gz: c777a2e462fcc195e9bee44e59829812dff6bf30
5
5
  SHA512:
6
- metadata.gz: 18d26229831fd5430c3089a3a709030aed50c28c67e167ecb23d8d22743fdf487d076789d1915750f09205d30051f4029295987025871e22b2e9b78d7fcc834c
7
- data.tar.gz: 379d370767e1ebb5fc39eeb7118cb5a5763fefcb7ead6718f8f851f784fcaa19b408c3e07085ed405baa5e225600fdc1b240849619ce79e6c1cbe7075b850040
6
+ metadata.gz: dbcaecf8462d8efca0a1fe6ce6ab50dc105d5c90c4d429703cf05b11308c13513af417b6f5c9239ee19d48925d02b70d68a2b2d9e80fa38264f388eda6c5ac07
7
+ data.tar.gz: 58ee50e0e9857bc8beadefd72c5480376ff136333019463d2bac19cfed8c7d0e6e1ae26e766674b696434b8e76fd0ae351194bc46deb795d00269847c9d4e1d7
@@ -40,6 +40,37 @@ describe Unidom::Shipment::ShipmentItem, type: :model do
40
40
  { quantity: '1_000_000_000.01' } => 1,
41
41
  { quantity: 1_000_000_000.01 } => 1
42
42
 
43
+ shipment_attributes = {
44
+ sender_party_id: SecureRandom.uuid,
45
+ sender_party_type: 'Unidom::Shipment::SenderParty::Mock',
46
+ sender_agent_id: SecureRandom.uuid,
47
+ sender_agent_type: 'Unidom::Shipment::SenderAgent::Mock',
48
+ sender_location_id: SecureRandom.uuid,
49
+ sender_location_type: 'Unidom::Shipment::SenderLocation::Mock',
50
+ sender_contact_id: SecureRandom.uuid,
51
+ sender_contact_type: 'Unidom::Shipment::SenderContact::Mock',
52
+ receiver_party_id: SecureRandom.uuid,
53
+ receiver_party_type: 'Unidom::Shipment::ReceiverParty::Mock',
54
+ receiver_agent_id: SecureRandom.uuid,
55
+ receiver_agent_type: 'Unidom::Shipment::ReceiverAgent::Mock',
56
+ receiver_location_id: SecureRandom.uuid,
57
+ receiver_location_type: 'Unidom::Shipment::ReceiverLocation::Mock',
58
+ receiver_contact_id: SecureRandom.uuid,
59
+ receiver_contact_type: 'Unidom::Shipment::ReceiverContact::Mock',
60
+ conveyance_code: 'CSSP',
61
+ estimated_ready_on: Date.current+2.days,
62
+ estimated_shipped_on: Date.current+3.days,
63
+ estimated_arrived_on: Date.current+9.days,
64
+ last_cancellable_at: Time.now+2.days,
65
+ shipped_at: Time.now+3.days,
66
+ received_at: Time.now+9.days,
67
+ cancelled_at: nil,
68
+ estimated_amount: 1_000.00,
69
+ actual_amount: 1_050.00
70
+ }
71
+
72
+ it_behaves_like 'belongs_to', model_attributes, :shipment, Unidom::Shipment::Shipment, shipment_attributes
73
+
43
74
  end
44
75
 
45
76
  end
@@ -83,6 +83,8 @@ describe Unidom::Shipment::Shipment, type: :model do
83
83
  { actual_amount: '1_000_000_000.01' } => 1,
84
84
  { actual_amount: 1_000_000_000.01 } => 1
85
85
 
86
+ it_behaves_like 'ProgneTapera::EnumCode', described_class.new(model_attributes), :conveyance, Unidom::Shipment::Conveyance
87
+
86
88
  end
87
89
 
88
90
  end
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Shipment
3
- VERSION = '0.7.2'.freeze
3
+ VERSION = '0.7.3'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unidom-shipment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Topbit Du
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-02 00:00:00.000000000 Z
11
+ date: 2017-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unidom-common