unidom-order 1.5.1 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 34d2f747076a1bd6d4d5f53bc44f20bcc47b8fc7
|
|
4
|
+
data.tar.gz: dcc7e01044ee152d85f94790509ef21eb39ba19e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
data/lib/unidom/order/version.rb
CHANGED
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.
|
|
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-
|
|
11
|
+
date: 2017-03-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: unidom-common
|