unidom-contact 1.4.1 → 1.4.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: c93b75990c1f5bb5344995f94d8e1e44069fee5a
|
4
|
+
data.tar.gz: dd14bb2d0085a7bbdf89dad4bd1a515946d62a0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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.
|
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-
|
11
|
+
date: 2017-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unidom-common
|