et_fake_ccd 0.1.11 → 0.1.12

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
  SHA256:
3
- metadata.gz: 481c48f7451a85cca8aad9076072c5799f2681e2bd250f0d52ac3200018eb970
4
- data.tar.gz: a20837c982a4a2ef44bcb6ed7f71bc6ee13c57918b81281e2140b1ca34397613
3
+ metadata.gz: 5f169aa37e2b5cdca502d9f4c6b615a79c93b7e1ea903d6f7d0f93f86b7b2546
4
+ data.tar.gz: a2ff3b5f15af23d50a146616b2fcb8e2ba9a5c8cd476efa8f1fd551a30e8697d
5
5
  SHA512:
6
- metadata.gz: 5763ad0180368ed47a0f957790e2de18ab9bf66e8b0662896d94eea2dc1f4f13a20d22b1e46adc5fa033270c00fb68c71b8286979fb85b63d4b98e90ad19314d
7
- data.tar.gz: c686f75d92663b1a7476abc47bf00a00dc689f4ff73a07fd9df6b3f4a0e17b0b08627fae9000b7cf3f96ac3649c62746c409fdccf4404ae37dcfc4693d1d4de9
6
+ metadata.gz: f8be5bceb14d92a5854caf5228f09a75568b6beecdd03609d20aef6db5515057ad62c5fe6b6a61f63842057ec358b4f3630b6c760854bcf2cf911c4cac6934b7
7
+ data.tar.gz: 52f29e02674038eddbc4a66f22dd42b359d7aeb2ea5940aa48ae0cde2a293a87078c674da6b11820e62473193ed1e97490218aa70b66855efbdeee93634b47c5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- et_fake_ccd (0.1.11)
4
+ et_fake_ccd (0.1.12)
5
5
  activemodel (~> 5.2, >= 5.2.3)
6
6
  roda (~> 3.21)
7
7
  rotp (~> 5.1)
@@ -34,6 +34,21 @@ module EtFakeCcd
34
34
  data.dig('data', 'claimantType', 'claimant_mobile_number').tap do |phone|
35
35
  errors.add :data, "Case data validation failed", field_error: { id: "claimantType.claimant_mobile_number", message: "The data entered is not valid for this type of field, please delete and re-enter using only valid data" } if phone.present? && phone.length > 14
36
36
  end
37
+ data.dig('data', 'claimantIndType', 'claimant_gender').tap do |gender|
38
+ next if gender.nil?
39
+ valid_values = ['Male', 'Female', 'Not Known', 'Non-binary']
40
+ errors.add :data, "Case data validation failed", field_error: { id: 'claimantIndType.claimant_gender', message: "#{gender} is not a valid value" } unless valid_values.include?(gender)
41
+ end
42
+ data.dig('data', 'claimantIndType', 'claimant_title1').tap do |title|
43
+ next if title.nil?
44
+ valid_values = ['Mr', 'Mrs', 'Miss', 'Ms', 'Dr', 'Prof', 'Sir', 'Lord', 'Lady', 'Dame', 'Capt', 'Rev', 'Other']
45
+ errors.add :data, "Case data validation failed", field_error: { id: 'claimantIndType.claimant_title1', message: "#{title} is not a valid value" } unless valid_values.include?(title)
46
+ end
47
+ data.dig('data', 'claimantType', 'claimant_contact_preference').tap do |pref|
48
+ next if pref.nil?
49
+ valid_values = ['Email', 'Post']
50
+ errors.add :data, "Case data validation failed", field_error: { id: 'claimantType.claimant_contact_preference', message: "#{pref} is not a valid value" } unless valid_values.include?(pref)
51
+ end
37
52
  end
38
53
  end
39
54
  end
@@ -1,3 +1,3 @@
1
1
  module EtFakeCcd
2
- VERSION = "0.1.11"
2
+ VERSION = "0.1.12"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: et_fake_ccd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.11
4
+ version: 0.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gary Taylor
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-07-17 00:00:00.000000000 Z
11
+ date: 2019-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: roda