unidom-position 1.5.2 → 1.5.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: dec8f46a499c42bc59de67d1a7150a8810bbe7b1
4
- data.tar.gz: fbeef69018f0f8b45b086e9ba6401833e0b7ceaf
3
+ metadata.gz: c0aebfeff22fac8fcee7b61f10af5548ac1a60ee
4
+ data.tar.gz: bee1c6d738a4e646db8ec74f6aaaf91f30b83124
5
5
  SHA512:
6
- metadata.gz: 2b10b7ce89d6880ea468abf8f0c378db79cb7d289241fb10d3f801b522b12ea690fcdfa028a2a195188b43d172e4de09478677d710bacf80602227f9c97ff42a
7
- data.tar.gz: 67eb9b856b56588bdd4fabcb496cf4231b9549de8a9e427fb3817afde787cd753c25de49dcfbf7830f5673f3e0cbc1107f055ee033dd0050deb40a190b1cb148
6
+ metadata.gz: 981a73856ae6facf5d4a79548e1cb741130d28465585c407e7bcd7054a42354c859d92b669f86731b56cc0b9430f1fa50027a469dbde61de84223ead32ed6c04
7
+ data.tar.gz: 4dfad23d77efd6cc99bb58b8f834577ea90401a9e62e56ef61e36f363e0f3a9917fbb43f502daf2a5aacdd8f0d4316e41206b1e2b8e5356286ea4ac93ae68dd0
@@ -44,6 +44,38 @@ describe Unidom::Position::Occupation, type: :model do
44
44
 
45
45
  it_behaves_like 'has_many', model_attributes, :positions, Unidom::Position::Position, [ position_1_attributes, position_2_attributes ]
46
46
 
47
+ =begin
48
+ post_1_attributes = {
49
+ organization_id: SecureRandom.uuid,
50
+ organization_type: 'Unidom::Position::Organization::Mock',
51
+ #position_id: SecureRandom.uuid,
52
+ name: 'Some Post #1'
53
+ }
54
+
55
+ post_2_attributes = {
56
+ organization_id: SecureRandom.uuid,
57
+ organization_type: 'Unidom::Position::Organization::Mock',
58
+ #position_id: SecureRandom.uuid,
59
+ name: 'Some Post #2'
60
+ }
61
+
62
+ it_behaves_like 'has_many', model_attributes, :posts, Unidom::Position::Post, [ post_1_attributes, post_2_attributes ]
63
+ =end
64
+
65
+ it_behaves_like 'scope', :scheme_id_is, [
66
+ { attributes_collection: [ model_attributes ], count_diff: 1, args: [ model_attributes[:scheme_id] ] },
67
+ { attributes_collection: [ model_attributes ], count_diff: 0, args: [ Unidom::Common::NULL_UUID ] },
68
+ { attributes_collection: [ model_attributes.merge(scheme_id: Unidom::Common::NULL_UUID) ], count_diff: 0, args: [ model_attributes[:scheme_id] ] },
69
+ { attributes_collection: [ model_attributes.merge(scheme_id: Unidom::Common::NULL_UUID) ], count_diff: 1, args: [ Unidom::Common::NULL_UUID ] }
70
+ ]
71
+
72
+ it_behaves_like 'scope', :scheme_type_is, [
73
+ { attributes_collection: [ model_attributes ], count_diff: 1, args: [ model_attributes[:scheme_type] ] },
74
+ { attributes_collection: [ model_attributes ], count_diff: 0, args: [ 'Unidom::Position::Scheme::Mock2' ] },
75
+ { attributes_collection: [ model_attributes.merge(scheme_type: 'Unidom::Position::Scheme::Mock2') ], count_diff: 0, args: [ model_attributes[:scheme_type] ] },
76
+ { attributes_collection: [ model_attributes.merge(scheme_type: 'Unidom::Position::Scheme::Mock2') ], count_diff: 1, args: [ 'Unidom::Position::Scheme::Mock2' ] }
77
+ ]
78
+
47
79
  end
48
80
 
49
81
  end
@@ -39,6 +39,22 @@ describe Unidom::Position::Position, type: :model do
39
39
 
40
40
  it_behaves_like 'belongs_to', model_attributes, :occupation, Unidom::Position::Occupation, occupation_attributes
41
41
 
42
+ post_1_attributes = {
43
+ organization_id: SecureRandom.uuid,
44
+ organization_type: 'Unidom::Position::Organization::Mock',
45
+ #position_id: SecureRandom.uuid,
46
+ name: 'Some Post #1'
47
+ }
48
+
49
+ post_2_attributes = {
50
+ organization_id: SecureRandom.uuid,
51
+ organization_type: 'Unidom::Position::Organization::Mock',
52
+ #position_id: SecureRandom.uuid,
53
+ name: 'Some Post #2'
54
+ }
55
+
56
+ it_behaves_like 'has_many', model_attributes, :posts, Unidom::Position::Post, [ post_1_attributes, post_2_attributes ]
57
+
42
58
  end
43
59
 
44
60
  end
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Position
3
- VERSION = '1.5.2'.freeze
3
+ VERSION = '1.5.3'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unidom-position
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.2
4
+ version: 1.5.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