unidom-requirement 0.3 → 0.3.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: 435daf43ca285b24fd1b8036bff45653150ab993
|
4
|
+
data.tar.gz: 623f8842d96ce22c7347faab25d479e4b14d1e7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cba4606273076ed43ed8f41038a618474603a61934798dc5be730e9f6130f8b870d44a635c4bb7a2dd2f642f9d306ba932f5de18db0ce277ff94a334d726b189
|
7
|
+
data.tar.gz: 7473ed9ad0f2a1e0538fd5d72b3b6f9fdc2d25e4a2e2e4924c53e8f20b7a01e1eecc02dd995393a56e0c9ed18a649298e6c38950d494f382fb443e9a5245b25b
|
@@ -26,6 +26,42 @@ describe Unidom::Requirement::Requirement, type: :model do
|
|
26
26
|
|
27
27
|
it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
|
28
28
|
|
29
|
+
it_behaves_like 'validates', model_attributes, :estimated_budget,
|
30
|
+
{ } => 0,
|
31
|
+
{ estimated_budget: nil } => 2,
|
32
|
+
{ estimated_budget: '' } => 2,
|
33
|
+
{ estimated_budget: 'A' } => 1,
|
34
|
+
{ estimated_budget: '-0.01' } => 1,
|
35
|
+
{ estimated_budget: -0.01 } => 1,
|
36
|
+
{ estimated_budget: 0 } => 1,
|
37
|
+
{ estimated_budget: '0' } => 1,
|
38
|
+
{ estimated_budget: 0.01 } => 0,
|
39
|
+
{ estimated_budget: '0.01' } => 0,
|
40
|
+
{ estimated_budget: '999_999_999.99' } => 0,
|
41
|
+
{ estimated_budget: 999_999_999.99 } => 0,
|
42
|
+
{ estimated_budget: 1_000_000_000 } => 1,
|
43
|
+
{ estimated_budget: '1_000_000_000' } => 1,
|
44
|
+
{ estimated_budget: 1_000_000_000.01 } => 1,
|
45
|
+
{ estimated_budget: '1_000_000_000.01' } => 1
|
46
|
+
|
47
|
+
it_behaves_like 'validates', model_attributes, :quantity,
|
48
|
+
{ } => 0,
|
49
|
+
{ quantity: nil } => 2,
|
50
|
+
{ quantity: '' } => 2,
|
51
|
+
{ quantity: 'A' } => 1,
|
52
|
+
{ quantity: '-0.01' } => 1,
|
53
|
+
{ quantity: -0.01 } => 1,
|
54
|
+
{ quantity: 0 } => 1,
|
55
|
+
{ quantity: '0' } => 1,
|
56
|
+
{ quantity: 0.01 } => 0,
|
57
|
+
{ quantity: '0.01' } => 0,
|
58
|
+
{ quantity: '999_999_999.99' } => 0,
|
59
|
+
{ quantity: 999_999_999.99 } => 0,
|
60
|
+
{ quantity: 1_000_000_000 } => 1,
|
61
|
+
{ quantity: '1_000_000_000' } => 1,
|
62
|
+
{ quantity: 1_000_000_000.01 } => 1,
|
63
|
+
{ quantity: '1_000_000_000.01' } => 1
|
64
|
+
|
29
65
|
end
|
30
66
|
|
31
67
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unidom-requirement
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.3.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-
|
11
|
+
date: 2017-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unidom-common
|