diff --git a/app/models/form/lettings/questions/lead_tenant_sex_registered_at_birth.rb b/app/models/form/lettings/questions/lead_tenant_sex_registered_at_birth.rb index 2e8523f51..33713e41e 100644 --- a/app/models/form/lettings/questions/lead_tenant_sex_registered_at_birth.rb +++ b/app/models/form/lettings/questions/lead_tenant_sex_registered_at_birth.rb @@ -5,6 +5,12 @@ class Form::Lettings::Questions::LeadTenantSexRegisteredAtBirth < ::Form::Questi @type = "radio" @check_answers_card_number = 1 @answer_options = ANSWER_OPTIONS + @inferred_check_answers_value = [{ + "condition" => { + @id => "R", + }, + "value" => "Prefers not to say", + }] @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] end diff --git a/app/models/form/lettings/questions/person_sex_registered_at_birth.rb b/app/models/form/lettings/questions/person_sex_registered_at_birth.rb index b549885b1..3ea89ab26 100644 --- a/app/models/form/lettings/questions/person_sex_registered_at_birth.rb +++ b/app/models/form/lettings/questions/person_sex_registered_at_birth.rb @@ -6,6 +6,12 @@ class Form::Lettings::Questions::PersonSexRegisteredAtBirth < ::Form::Question @answer_options = ANSWER_OPTIONS @person_index = person_index @question_number = question_number + @inferred_check_answers_value = [{ + "condition" => { + id => "R", + }, + "value" => "Prefers not to say", + }] end ANSWER_OPTIONS = { diff --git a/spec/models/form/lettings/questions/lead_tenant_sex_registered_at_birth_spec.rb b/spec/models/form/lettings/questions/lead_tenant_sex_registered_at_birth_spec.rb index bdac0ddf9..ab778ece0 100644 --- a/spec/models/form/lettings/questions/lead_tenant_sex_registered_at_birth_spec.rb +++ b/spec/models/form/lettings/questions/lead_tenant_sex_registered_at_birth_spec.rb @@ -44,7 +44,7 @@ RSpec.describe Form::Lettings::Questions::LeadTenantSexRegisteredAtBirth, type: end it "has the correct inferred_check_answers_value" do - expect(question.inferred_check_answers_value).to be_nil + expect(question.inferred_check_answers_value).to eq([{ "condition" => { "sexrab1" => "R" }, "value" => "Prefers not to say" }]) end it "has the correct question number" do diff --git a/spec/models/form/lettings/questions/person_sex_registered_at_birth_spec.rb b/spec/models/form/lettings/questions/person_sex_registered_at_birth_spec.rb index 90f48cfda..904814640 100644 --- a/spec/models/form/lettings/questions/person_sex_registered_at_birth_spec.rb +++ b/spec/models/form/lettings/questions/person_sex_registered_at_birth_spec.rb @@ -49,7 +49,7 @@ RSpec.describe Form::Lettings::Questions::PersonSexRegisteredAtBirth, type: :mod end it "has the correct inferred_check_answers_value" do - expect(question.inferred_check_answers_value).to be_nil + expect(question.inferred_check_answers_value).to eq([{ "condition" => { "sexrab2" => "R" }, "value" => "Prefers not to say" }]) end it "has the correct question number" do @@ -70,7 +70,7 @@ RSpec.describe Form::Lettings::Questions::PersonSexRegisteredAtBirth, type: :mod end it "has the correct inferred_check_answers_value" do - expect(question.inferred_check_answers_value).to be_nil + expect(question.inferred_check_answers_value).to eq([{ "condition" => { "sexrab3" => "R" }, "value" => "Prefers not to say" }]) end it "has the correct question number" do @@ -91,7 +91,7 @@ RSpec.describe Form::Lettings::Questions::PersonSexRegisteredAtBirth, type: :mod end it "has the correct inferred_check_answers_value" do - expect(question.inferred_check_answers_value).to be_nil + expect(question.inferred_check_answers_value).to eq([{ "condition" => { "sexrab4" => "R" }, "value" => "Prefers not to say" }]) end it "has the correct question number" do @@ -112,7 +112,7 @@ RSpec.describe Form::Lettings::Questions::PersonSexRegisteredAtBirth, type: :mod end it "has the correct inferred_check_answers_value" do - expect(question.inferred_check_answers_value).to be_nil + expect(question.inferred_check_answers_value).to eq([{ "condition" => { "sexrab5" => "R" }, "value" => "Prefers not to say" }]) end it "has the correct question number" do @@ -133,7 +133,7 @@ RSpec.describe Form::Lettings::Questions::PersonSexRegisteredAtBirth, type: :mod end it "has the correct inferred_check_answers_value" do - expect(question.inferred_check_answers_value).to be_nil + expect(question.inferred_check_answers_value).to eq([{ "condition" => { "sexrab6" => "R" }, "value" => "Prefers not to say" }]) end it "has the correct question number" do @@ -154,7 +154,7 @@ RSpec.describe Form::Lettings::Questions::PersonSexRegisteredAtBirth, type: :mod end it "has the correct inferred_check_answers_value" do - expect(question.inferred_check_answers_value).to be_nil + expect(question.inferred_check_answers_value).to eq([{ "condition" => { "sexrab7" => "R" }, "value" => "Prefers not to say" }]) end it "has the correct question number" do @@ -175,7 +175,7 @@ RSpec.describe Form::Lettings::Questions::PersonSexRegisteredAtBirth, type: :mod end it "has the correct inferred_check_answers_value" do - expect(question.inferred_check_answers_value).to be_nil + expect(question.inferred_check_answers_value).to eq([{ "condition" => { "sexrab8" => "R" }, "value" => "Prefers not to say" }]) end it "has the correct question number" do