unidom-order 1.5.1 → 1.5.2

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: 6658e1356ce649a6b3415a37cb0ca9fea5e5ffdb
4
- data.tar.gz: a7179fba11b25779487bcd5113bd50fc25b574fc
3
+ metadata.gz: 34d2f747076a1bd6d4d5f53bc44f20bcc47b8fc7
4
+ data.tar.gz: dcc7e01044ee152d85f94790509ef21eb39ba19e
5
5
  SHA512:
6
- metadata.gz: 397617eb953fadaeffc966b1124766aaeff8b80da21f4b01392ff248b922798d00c716e9e815202854914351a5b0546dda2b6764415310a41f60ac4d1ea1d73b
7
- data.tar.gz: 36b6863723cc0de626cc4091253aed148e81237f2aa3fdb6607391b739edbaf7fb32cb6a0d4e9a4d97b6972267d94bc37a421a55a1318a1f18880644cf399835
6
+ metadata.gz: 355705e02628074cfd5c3f4998272b935dda58851cbf0dd93570ef25dfc761f5ff031765a23096c6af1308e517ebbde5f39af9d8ba30a60d7d30dbbca9ffbf3f
7
+ data.tar.gz: 5ffa0a13570562651140f1c77299fef8b8877bd048edef5c89094db91cd74e692166ed4ee0d3b9ee04fba8b791f78c667abf93ecb5d3463c6c945d7acb6ad9c2
@@ -111,6 +111,18 @@ describe Unidom::Order::OrderItem, type: :model do
111
111
  { subtotal_amount: '1_000_000_000.01' } => 1,
112
112
  { subtotal_amount: 1_000_000_000.01 } => 1
113
113
 
114
+ order_attributes = {
115
+ placer_id: SecureRandom.uuid,
116
+ placer_type: 'Unidom::Order::Placer::Mock',
117
+ taker_id: SecureRandom.uuid,
118
+ taker_type: 'Unidom::Order::Taker::Mock',
119
+ number: '202001019527',
120
+ purchase_amount: 10.00,
121
+ aggregate_amount: 12.00
122
+ }
123
+
124
+ it_behaves_like 'belongs_to', model_attributes, :order, Unidom::Order::Order, order_attributes
125
+
114
126
  end
115
127
 
116
128
  end
@@ -79,6 +79,32 @@ describe Unidom::Order::Order, type: :model do
79
79
  { aggregate_amount: '1_000_000_000.01' } => 1,
80
80
  { aggregate_amount: 1_000_000_000.01 } => 1
81
81
 
82
+ order_item_1_attributes = {
83
+ ordered_id: SecureRandom.uuid,
84
+ ordered_type: 'Unidom::Order::Ordered::Mock',
85
+ placer_id: SecureRandom.uuid,
86
+ placer_type: 'Unidom::Order::Placer::Mock',
87
+ ordinal: 1,
88
+ unit_price: 10.00,
89
+ quantity: 12.00,
90
+ purchase_amount: 120.00,
91
+ subtotal_amount: 100.00
92
+ }
93
+
94
+ order_item_2_attributes = {
95
+ ordered_id: SecureRandom.uuid,
96
+ ordered_type: 'Unidom::Order::Ordered::Mock',
97
+ placer_id: SecureRandom.uuid,
98
+ placer_type: 'Unidom::Order::Placer::Mock',
99
+ ordinal: 2,
100
+ unit_price: 20.00,
101
+ quantity: 24.00,
102
+ purchase_amount: 480.00,
103
+ subtotal_amount: 400.00
104
+ }
105
+
106
+ it_behaves_like 'has_many', model_attributes, :items, Unidom::Order::OrderItem, [ order_item_1_attributes, order_item_2_attributes ]
107
+
82
108
  end
83
109
 
84
110
  end
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Order
3
- VERSION = '1.5.1'.freeze
3
+ VERSION = '1.5.2'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unidom-order
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
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-02-19 00:00:00.000000000 Z
11
+ date: 2017-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unidom-common