unidom-position 1.5.3 → 1.5.4
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: 67ea03639ae8d9927929164d570168a7b95f7a91
|
4
|
+
data.tar.gz: 4093409eff0bccf13048081800d32055290e887f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2fe2e87d7d3fce367977859d7b352264f641043444d879d5d66c75c90d083f0febabe9b799e455a6f2b9497f32c757f194598c810a2707fb717dad9dfbb8ad5
|
7
|
+
data.tar.gz: 1fc6871a544c33e397bd73b9f78c266928497f27288db880e3465cbcabd579a470a15348e11cb9bbba9452d9bd27414ec5d58dd2c9318ef58db6874cd6ab5bbc
|
@@ -15,20 +15,9 @@ describe Unidom::Position::Occupation, type: :model do
|
|
15
15
|
name: 'Some Occupation'
|
16
16
|
}
|
17
17
|
|
18
|
-
name_max_length = described_class.columns_hash['name'].limit
|
19
|
-
|
20
18
|
it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
|
21
19
|
|
22
|
-
it_behaves_like 'validates', model_attributes, :name,
|
23
|
-
{ } => 0,
|
24
|
-
{ name: nil } => 2,
|
25
|
-
{ name: '' } => 2,
|
26
|
-
{ name: 'A' } => 1,
|
27
|
-
{ name: 'AA' } => 0,
|
28
|
-
{ name: 'AAA' } => 0,
|
29
|
-
{ name: 'A'*(name_max_length-1) } => 0,
|
30
|
-
{ name: 'A'*name_max_length } => 0,
|
31
|
-
{ name: 'A'*(name_max_length+1) } => 1
|
20
|
+
it_behaves_like 'validates text', model_attributes, :name, length: 2..described_class.columns_hash['name'].limit
|
32
21
|
|
33
22
|
position_1_attributes = {
|
34
23
|
organization_id: SecureRandom.uuid,
|
@@ -15,20 +15,9 @@ describe Unidom::Position::Position, type: :model do
|
|
15
15
|
name: 'Some Position'
|
16
16
|
}
|
17
17
|
|
18
|
-
name_max_length = described_class.columns_hash['name'].limit
|
19
|
-
|
20
18
|
it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
|
21
19
|
|
22
|
-
it_behaves_like 'validates', model_attributes, :name,
|
23
|
-
{ } => 0,
|
24
|
-
{ name: nil } => 2,
|
25
|
-
{ name: '' } => 2,
|
26
|
-
{ name: 'A' } => 1,
|
27
|
-
{ name: 'AA' } => 0,
|
28
|
-
{ name: 'AAA' } => 0,
|
29
|
-
{ name: 'A'*(name_max_length-1) } => 0,
|
30
|
-
{ name: 'A'*name_max_length } => 0,
|
31
|
-
{ name: 'A'*(name_max_length+1) } => 1
|
20
|
+
it_behaves_like 'validates text', model_attributes, :name, length: 2..described_class.columns_hash['name'].limit
|
32
21
|
|
33
22
|
occupation_attributes = {
|
34
23
|
scheme_id: SecureRandom.uuid,
|
@@ -15,20 +15,9 @@ describe Unidom::Position::Post, type: :model do
|
|
15
15
|
name: 'Some Post'
|
16
16
|
}
|
17
17
|
|
18
|
-
name_max_length = described_class.columns_hash['name'].limit
|
19
|
-
|
20
18
|
it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
|
21
19
|
|
22
|
-
it_behaves_like 'validates', model_attributes, :name,
|
23
|
-
{ } => 0,
|
24
|
-
{ name: nil } => 2,
|
25
|
-
{ name: '' } => 2,
|
26
|
-
{ name: 'A' } => 1,
|
27
|
-
{ name: 'AA' } => 0,
|
28
|
-
{ name: 'AAA' } => 0,
|
29
|
-
{ name: 'A'*(name_max_length-1) } => 0,
|
30
|
-
{ name: 'A'*name_max_length } => 0,
|
31
|
-
{ name: 'A'*(name_max_length+1) } => 1
|
20
|
+
it_behaves_like 'validates text', model_attributes, :name, length: 2..described_class.columns_hash['name'].limit
|
32
21
|
|
33
22
|
end
|
34
23
|
|
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.
|
4
|
+
version: 1.5.4
|
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-
|
11
|
+
date: 2017-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unidom-common
|