unidom-contact 1.4.1 → 1.4.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: 90ab4bbccf8f42e982b867ce4137a4526bf900ae
4
- data.tar.gz: 77b6f26b29d6cea5c19c48063a0d5779c6317957
3
+ metadata.gz: c93b75990c1f5bb5344995f94d8e1e44069fee5a
4
+ data.tar.gz: dd14bb2d0085a7bbdf89dad4bd1a515946d62a0e
5
5
  SHA512:
6
- metadata.gz: 96ca484032fa3edb02ad080355905b98bf9421eacfabbf7bea4f767d077a0533226eb8b8df2d45c6e72cfcccdbdcd2bbd672cfce877eb6489ca70fdbca0d9ea4
7
- data.tar.gz: 5d65a43f43c35c19dac9b49abc4f6c82a7f7a572ec83493bc51ff4d51d0c5bf4f4acdc3e571aa15965bfa328cdc27273baff157eb71b13cb732dfddc49b8a785
6
+ metadata.gz: 7220177aff9cc80399353278286703987dd677623082dcff1ea4af3617f49e3ff1a6be61dc8f7529984a0f39aca6fb95cae7aa6041eaad8eb2df7356ce0d54c1
7
+ data.tar.gz: 17d9e2aa10191194b85a94b5bb2e384327c83afe134a0d3e6f2e254ab3a58d7b8a2e4d942da8226032e5ec9c8a66bd69c108fd372f85d2249ae2dab9f55e140c
@@ -31,6 +31,13 @@ describe Unidom::Contact::ContactSubscription, type: :model do
31
31
  { name: 'A'*name_max_length } => 0,
32
32
  { name: 'A'*(name_max_length+1) } => 1
33
33
 
34
+ email_address_attributes = {
35
+ personalized_name: 'Tim Jason',
36
+ full_address: 'tim.jason@company.com'
37
+ }
38
+
39
+ it_behaves_like 'belongs_to', model_attributes, :contact, Unidom::Contact::EmailAddress, email_address_attributes
40
+
34
41
  end
35
42
 
36
43
  end
@@ -32,6 +32,27 @@ describe Unidom::Contact::EmailAddress, type: :model do
32
32
  { full_address: "l@#{'c'*(full_address_max_length-5)}.de" } => 0,
33
33
  { full_address: "l@#{'c'*(full_address_max_length-4)}.de" } => 1
34
34
 
35
+ it_behaves_like 'scope', :full_address_is, [
36
+ { attributes_collection: [ model_attributes ], count_diff: 1, args: [ model_attributes[:full_address] ] },
37
+ { attributes_collection: [ model_attributes ], count_diff: 0, args: [ 'tom.king@corporation.com' ] },
38
+ { attributes_collection: [ model_attributes.merge(full_address: 'tom.king@corporation.com') ], count_diff: 0, args: [ model_attributes[:full_address] ] },
39
+ { attributes_collection: [ model_attributes.merge(full_address: 'tom.king@corporation.com') ], count_diff: 1, args: [ 'tom.king@corporation.com' ] }
40
+ ]
41
+
42
+ it_behaves_like 'scope', :local_part_is, [
43
+ { attributes_collection: [ model_attributes ], count_diff: 1, args: [ 'tim.jason' ] },
44
+ { attributes_collection: [ model_attributes ], count_diff: 0, args: [ 'tom.king' ] },
45
+ { attributes_collection: [ model_attributes.merge(full_address: 'tom.king@corporation.com') ], count_diff: 0, args: [ 'tim.jason' ] },
46
+ { attributes_collection: [ model_attributes.merge(full_address: 'tom.king@corporation.com') ], count_diff: 1, args: [ 'tom.king' ] }
47
+ ]
48
+
49
+ it_behaves_like 'scope', :domain_part_is, [
50
+ { attributes_collection: [ model_attributes ], count_diff: 1, args: [ 'company.com' ] },
51
+ { attributes_collection: [ model_attributes ], count_diff: 0, args: [ 'corporation.com' ] },
52
+ { attributes_collection: [ model_attributes.merge(full_address: 'tom.king@corporation.com') ], count_diff: 0, args: [ 'company.com' ] },
53
+ { attributes_collection: [ model_attributes.merge(full_address: 'tom.king@corporation.com') ], count_diff: 1, args: [ 'corporation.com' ] }
54
+ ]
55
+
35
56
  end
36
57
 
37
58
  end
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Contact
3
- VERSION = '1.4.1'.freeze
3
+ VERSION = '1.4.2'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unidom-contact
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.4.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-16 00:00:00.000000000 Z
11
+ date: 2017-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unidom-common