unidom-score 1.1.5 → 1.1.6
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: 056ae610c074bf7972df64a95f69e9635485ad1d
|
4
|
+
data.tar.gz: cde0857376c46b3b968d77be25e84e792b5c85fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eea1380f9d3169d16779dcbe676a764ad44d10fdc86b2f9156caabc15c64531e18069bbf3f2f5feed74a58c7066eaba481b24d27cb0e81bbe941273b2d2cafd8
|
7
|
+
data.tar.gz: b3d2e6c9a4b56aa1fdf92462d41a34bf7455e74a52abecd8f37c9b4c33328cd6056bbbedad061b5cdac763cb14b922b19813e5f6c7b2f1b82916a7c788f6e6b7
|
@@ -23,27 +23,8 @@ describe Unidom::Score::ScoreItem, type: :model do
|
|
23
23
|
it_behaves_like 'validates text', model_attributes, :title,
|
24
24
|
length: 2..described_class.columns_hash['title'].limit, allow_blank: true
|
25
25
|
|
26
|
-
it_behaves_like 'validates', model_attributes, :score,
|
27
|
-
|
28
|
-
{ score: nil } => 2,
|
29
|
-
{ score: '' } => 2,
|
30
|
-
{ score: '1' } => 0,
|
31
|
-
{ score: 1 } => 0,
|
32
|
-
{ score: 'A' } => 1,
|
33
|
-
{ score: '0.00' } => 0,
|
34
|
-
{ score: 0.00 } => 0,
|
35
|
-
{ score: '-999_999_999.99' } => 0,
|
36
|
-
{ score: -999_999_999.99 } => 0,
|
37
|
-
{ score: '-1_000_000_000' } => 0,
|
38
|
-
{ score: -1_000_000_000 } => 0,
|
39
|
-
{ score: '-1_000_000_000.01' } => 1,
|
40
|
-
{ score: -1_000_000_000.01 } => 1,
|
41
|
-
{ score: '999_999_999.99' } => 0,
|
42
|
-
{ score: 999_999_999.99 } => 0,
|
43
|
-
{ score: '1_000_000_000' } => 0,
|
44
|
-
{ score: 1_000_000_000 } => 0,
|
45
|
-
{ score: '1_000_000_000.01' } => 1,
|
46
|
-
{ score: 1_000_000_000.01 } => 1
|
26
|
+
it_behaves_like 'validates numericality', model_attributes, :score,
|
27
|
+
range: -1_000_000_000..1_000_000_000, minimum_inclusive: true, maximum_inclusive: true
|
47
28
|
|
48
29
|
score_sheet_attributes = {
|
49
30
|
template_id: SecureRandom.uuid,
|
@@ -19,6 +19,9 @@ describe Unidom::Score::ScoreItemTemplate, type: :model do
|
|
19
19
|
it_behaves_like 'validates text', model_attributes, :title,
|
20
20
|
length: 2..described_class.columns_hash['title'].limit
|
21
21
|
|
22
|
+
it_behaves_like 'validates numericality', model_attributes, :score,
|
23
|
+
range: -1_000_000_000..1_000_000_000, minimum_inclusive: true, maximum_inclusive: true
|
24
|
+
|
22
25
|
score_sheet_template_attributes = {
|
23
26
|
subject_id: SecureRandom.uuid,
|
24
27
|
subject_type: 'Unidom::Score::Subject::Mock',
|
data/lib/unidom/score/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unidom-score
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.6
|
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-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unidom-common
|