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: a5eb67e0ec808b5df88cb9c5afd84343c7c6d216
4
- data.tar.gz: 497b7de5e12cbf9efd9ad29beb4ef768af16a2d8
3
+ metadata.gz: cc3e303a323f349af2696bd4eb8eca5a5f6a59ee
4
+ data.tar.gz: 5b490b201db62e71c0c238277f296df9c4829e55
5
5
  SHA512:
6
- metadata.gz: dd2eac167ab34a0e25396cae5ea6f431f331d5fc9e5e6ccac14624bc61fba0c9b86e8503d8364a0779dff91d714d93168615634070d60fe780128854fc57852e
7
- data.tar.gz: addbf52fc9601771b06b1fc35c958c98c55eb6c347d40e01344adfdf45757415be84a166130d5d17756727fb112fc413b27dd790c2d67fba86418741d7f4201f
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
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Shopping
3
- VERSION = '1.7.1'.freeze
3
+ VERSION = '1.7.2'.freeze
4
4
  end
5
5
  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.1
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-17 00:00:00.000000000 Z
11
+ date: 2017-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unidom-common