unidom-dictionary 0.3.1 → 0.3.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: 1458f638496af9c03b61838398c50facaac7f629
|
4
|
+
data.tar.gz: 7a92e1700cd66349dec8abfff78d06257f88c9d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b35ed604a72048bf1fb10b44b2672abbf98c464ceb6051b046a44d19fc614d4bb772a76e6d91c770fc2108b80cb563d66ea35db9d965510858e6be358d3d940
|
7
|
+
data.tar.gz: a3f84b12ecec510e7ac85b231f85029a785e7eaed30da8c6d906e10e51d36c2d6834df0b4d4151cfd5b541d245d63d6ab82bd2ecdd8cfde81cb990ea3d050cbd
|
@@ -16,37 +16,14 @@ describe Unidom::Dictionary::DictionaryItem, type: :model do
|
|
16
16
|
|
17
17
|
it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
|
18
18
|
|
19
|
-
it_behaves_like 'validates', model_attributes, :dictionary_code,
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
{ dictionary_code: 'AAAAA' } => 1
|
28
|
-
|
29
|
-
it_behaves_like 'validates', model_attributes, :code,
|
30
|
-
{ } => 0,
|
31
|
-
{ code: nil } => 0,
|
32
|
-
{ code: '' } => 0,
|
33
|
-
{ code: 'A' } => 0,
|
34
|
-
{ code: 'AA' } => 0,
|
35
|
-
{ code: 'AAA' } => 0,
|
36
|
-
{ code: 'A'*63 } => 0,
|
37
|
-
{ code: 'A'*64 } => 0,
|
38
|
-
{ code: 'A'*65 } => 1
|
39
|
-
|
40
|
-
it_behaves_like 'validates', model_attributes, :value,
|
41
|
-
{ } => 0,
|
42
|
-
{ value: nil } => 2,
|
43
|
-
{ value: '' } => 2,
|
44
|
-
{ value: 'A' } => 1,
|
45
|
-
{ value: 'AA' } => 0,
|
46
|
-
{ value: 'AAA' } => 0,
|
47
|
-
{ value: 'A'*199 } => 0,
|
48
|
-
{ value: 'A'*200 } => 0,
|
49
|
-
{ value: 'A'*201 } => 1
|
19
|
+
it_behaves_like 'validates text', model_attributes, :dictionary_code,
|
20
|
+
length: described_class.columns_hash['dictionary_code'].limit..described_class.columns_hash['dictionary_code'].limit
|
21
|
+
|
22
|
+
it_behaves_like 'validates text', model_attributes, :code,
|
23
|
+
length: 1..described_class.columns_hash['code'].limit, allow_blank: true
|
24
|
+
|
25
|
+
it_behaves_like 'validates text', model_attributes, :value,
|
26
|
+
length: 2..described_class.columns_hash['value'].limit
|
50
27
|
|
51
28
|
end
|
52
29
|
|
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unidom-dictionary
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.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-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unidom-common
|
@@ -53,6 +53,7 @@ files:
|
|
53
53
|
- lib/unidom/dictionary.rb
|
54
54
|
- lib/unidom/dictionary/engine.rb
|
55
55
|
- lib/unidom/dictionary/models_rspec.rb
|
56
|
+
- lib/unidom/dictionary/rspec_shared_examples.rb
|
56
57
|
- lib/unidom/dictionary/types_rspec.rb
|
57
58
|
- lib/unidom/dictionary/validators_rspec.rb
|
58
59
|
- lib/unidom/dictionary/version.rb
|