unidom-shopping 1.7.1 → 1.7.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc3e303a323f349af2696bd4eb8eca5a5f6a59ee
|
4
|
+
data.tar.gz: 5b490b201db62e71c0c238277f296df9c4829e55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6240e5ba6b34e585fb7c3d06e24abea3106f5d0356fae87bc37abb3a865e0fc7a3f5d3a74d0228abb6c688ee85aee65692058dff4e93fcb12c9eb71fccd89ae
|
7
|
+
data.tar.gz: 7c09ce64d2cea7ff16304a41850cdcc2d3c2d4972c95c647b812e964585428d95b4d444a60335e08e33b01b239058fe7a84624fc2202f3f950d489a69c24ba51
|
@@ -17,6 +17,26 @@ describe Unidom::Shopping::ShoppingCart, type: :model do
|
|
17
17
|
|
18
18
|
it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
|
19
19
|
|
20
|
+
shopping_item_1_attributes = {
|
21
|
+
shopper_id: SecureRandom.uuid,
|
22
|
+
shopper_type: 'Unidom::Shopping::Shopper',
|
23
|
+
shopped_id: SecureRandom.uuid,
|
24
|
+
shopped_type: 'Unidom::Shopping::Shopped',
|
25
|
+
unit_price: 12.00,
|
26
|
+
quantity: 5.00
|
27
|
+
}
|
28
|
+
|
29
|
+
shopping_item_2_attributes = {
|
30
|
+
shopper_id: SecureRandom.uuid,
|
31
|
+
shopper_type: 'Unidom::Shopping::Shopper',
|
32
|
+
shopped_id: SecureRandom.uuid,
|
33
|
+
shopped_type: 'Unidom::Shopping::Shopped',
|
34
|
+
unit_price: 19.98,
|
35
|
+
quantity: 2.00
|
36
|
+
}
|
37
|
+
|
38
|
+
it_behaves_like 'has_many', model_attributes, :items, Unidom::Shopping::ShoppingItem, [ shopping_item_1_attributes, shopping_item_2_attributes ]
|
39
|
+
|
20
40
|
end
|
21
41
|
|
22
42
|
end
|
@@ -64,6 +64,15 @@ describe Unidom::Shopping::ShoppingItem, type: :model do
|
|
64
64
|
{ quantity: '1_000_000_000.01' } => 1,
|
65
65
|
{ quantity: 1_000_000_000.01 } => 1
|
66
66
|
|
67
|
+
shopping_cart_attributes = {
|
68
|
+
shopper_id: SecureRandom.uuid,
|
69
|
+
shopper_type: 'Unidom::Shopping::Shopper',
|
70
|
+
shop_id: SecureRandom.uuid,
|
71
|
+
shop_type: 'Unidom::Shopping::Shop'
|
72
|
+
}
|
73
|
+
|
74
|
+
it_behaves_like 'belongs_to', model_attributes, :shopping_cart, Unidom::Shopping::ShoppingCart, shopping_cart_attributes
|
75
|
+
|
67
76
|
end
|
68
77
|
|
69
78
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unidom-shopping
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.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
|
11
|
+
date: 2017-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unidom-common
|