diff --git a/app/models/form/lettings/questions/nationality_all_group.rb b/app/models/form/lettings/questions/nationality_all_group.rb index 065a4e245..2ba9e5cde 100644 --- a/app/models/form/lettings/questions/nationality_all_group.rb +++ b/app/models/form/lettings/questions/nationality_all_group.rb @@ -16,6 +16,6 @@ class Form::Lettings::Questions::NationalityAllGroup < ::Form::Question ANSWER_OPTIONS = { "826" => { "value" => "United Kingdom" }, "12" => { "value" => "Other" }, - "13" => { "value" => "Tenant prefers not to say" }, + "0" => { "value" => "Tenant prefers not to say" }, }.freeze end diff --git a/app/models/form/sales/questions/nationality_all_group.rb b/app/models/form/sales/questions/nationality_all_group.rb index 349485188..c9b1e71bc 100644 --- a/app/models/form/sales/questions/nationality_all_group.rb +++ b/app/models/form/sales/questions/nationality_all_group.rb @@ -15,6 +15,6 @@ class Form::Sales::Questions::NationalityAllGroup < ::Form::Question ANSWER_OPTIONS = { "826" => { "value" => "United Kingdom" }, "12" => { "value" => "Other" }, - "13" => { "value" => "Buyer prefers not to say" }, + "0" => { "value" => "Buyer prefers not to say" }, }.freeze end diff --git a/app/models/log.rb b/app/models/log.rb index 5de8b924c..10e2078ee 100644 --- a/app/models/log.rb +++ b/app/models/log.rb @@ -210,7 +210,7 @@ class Log < ApplicationRecord end def nationality_uk_or_prefers_not_to_say? - nationality_all_group == 13 || nationality_all_group == 826 + nationality_all_group == 0 || nationality_all_group == 826 end private diff --git a/app/models/sales_log.rb b/app/models/sales_log.rb index 1591e4a14..4e8d64f18 100644 --- a/app/models/sales_log.rb +++ b/app/models/sales_log.rb @@ -475,6 +475,6 @@ class SalesLog < Log end def nationality2_uk_or_prefers_not_to_say? - nationality_all_buyer2_group == 13 || nationality_all_buyer2_group == 826 + nationality_all_buyer2_group == 0 || nationality_all_buyer2_group == 826 end end diff --git a/spec/models/lettings_log_spec.rb b/spec/models/lettings_log_spec.rb index 7d2fcc8c2..5c55d87cb 100644 --- a/spec/models/lettings_log_spec.rb +++ b/spec/models/lettings_log_spec.rb @@ -2359,7 +2359,7 @@ RSpec.describe LettingsLog do end it "correctly derives nationality_all when it's prefers not to say" do - expect { lettings_log.update!(nationality_all_group: 13, declaration: 1) }.to change(lettings_log, :nationality_all).to 13 + expect { lettings_log.update!(nationality_all_group: 0, declaration: 1) }.to change(lettings_log, :nationality_all).to 0 end it "does not derive nationality_all when it's other or not given" do diff --git a/spec/models/sales_log_spec.rb b/spec/models/sales_log_spec.rb index 87c9b32f4..42aa64fec 100644 --- a/spec/models/sales_log_spec.rb +++ b/spec/models/sales_log_spec.rb @@ -585,8 +585,8 @@ RSpec.describe SalesLog, type: :model do end it "correctly derives nationality_all/nationality_all_buyer2 when buyer prefers not to say" do - expect { sales_log.update!(nationality_all_group: 13) }.to change(sales_log, :nationality_all).to 13 - expect { sales_log.update!(nationality_all_buyer2_group: 13) }.to change(sales_log, :nationality_all_buyer2).to 13 + expect { sales_log.update!(nationality_all_group: 0) }.to change(sales_log, :nationality_all).to 0 + expect { sales_log.update!(nationality_all_buyer2_group: 0) }.to change(sales_log, :nationality_all_buyer2).to 0 end it "does not derive nationality_all/nationality_all_buyer2 when it is other or not given" do