unidom-position 1.5 → 1.5.1
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: e6ddb64e6ad18f4e5e7c06671a13706c1b9ac722
|
4
|
+
data.tar.gz: 1954b896bd53c093685dd5891c1798887f2dd98e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e579c58409d2ea75bf717dd48df033cdd3e7b7f4dd7d94b221ccae79d15386b25a2479e1deb45070dd0ccd02e0f5af8c5cc3e4f77898292c49566bb61d5034ba
|
7
|
+
data.tar.gz: e0c5015c998a8977101ee4adce24aeba3e8fab631a4fd980f53d1db774584f8273ddc09fdc1c4ea407109c9606d19148bdc941fe1419e38621747c1bc8f03b4f
|
@@ -15,8 +15,21 @@ 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
|
+
|
18
20
|
it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
|
19
21
|
|
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
|
32
|
+
|
20
33
|
end
|
21
34
|
|
22
35
|
end
|
@@ -15,8 +15,21 @@ 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
|
+
|
18
20
|
it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
|
19
21
|
|
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
|
32
|
+
|
20
33
|
end
|
21
34
|
|
22
35
|
end
|
@@ -15,8 +15,21 @@ 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
|
+
|
18
20
|
it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
|
19
21
|
|
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
|
32
|
+
|
20
33
|
end
|
21
34
|
|
22
35
|
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:
|
4
|
+
version: 1.5.1
|
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-
|
11
|
+
date: 2017-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unidom-common
|