Browse Source

CLDC-1971: Update text for 'prefers not to say' answer to buyer 1 ethnic group question

pull/2265/head
Robert Sullivan 2 years ago
parent
commit
d5bb290cd0
  1. 8
      app/models/form/sales/questions/buyer1_ethnic_group.rb
  2. 11
      spec/models/form/sales/questions/buyer1_ethnic_group_spec.rb

8
app/models/form/sales/questions/buyer1_ethnic_group.rb

@ -7,12 +7,6 @@ class Form::Sales::Questions::Buyer1EthnicGroup < ::Form::Question
@type = "radio"
@answer_options = ANSWER_OPTIONS
@hint_text = "Buyer 1 is the person in the household who does the most paid work. If it’s a joint purchase and the buyers do the same amount of paid work, buyer 1 is whoever is the oldest."
@inferred_check_answers_value = [{
"condition" => {
"ethnic_group" => 17,
},
"value" => "Prefers not to say",
}]
@check_answers_card_number = 1
@question_number = 22
end
@ -24,6 +18,6 @@ class Form::Sales::Questions::Buyer1EthnicGroup < ::Form::Question
"3" => { "value" => "Black, African, Caribbean or Black British" },
"4" => { "value" => "Arab or other ethnic group" },
"divider" => { "value" => true },
"17" => { "value" => "Buyer 1 prefers not to say" },
"17" => { "value" => "Buyer prefers not to say" },
}.freeze
end

11
spec/models/form/sales/questions/buyer1_ethnic_group_spec.rb

@ -39,7 +39,7 @@ RSpec.describe Form::Sales::Questions::Buyer1EthnicGroup, type: :model do
expect(question.answer_options).to eq({
"0" => { "value" => "White" },
"1" => { "value" => "Mixed or Multiple ethnic groups" },
"17" => { "value" => "Buyer 1 prefers not to say" },
"17" => { "value" => "Buyer prefers not to say" },
"2" => { "value" => "Asian or Asian British" },
"3" => { "value" => "Black, African, Caribbean or Black British" },
"4" => { "value" => "Arab or other ethnic group" },
@ -50,13 +50,4 @@ RSpec.describe Form::Sales::Questions::Buyer1EthnicGroup, type: :model do
it "has the correct check_answers_card_number" do
expect(question.check_answers_card_number).to eq(1)
end
it "has the correct inferred_check_answers_value" do
expect(question.inferred_check_answers_value).to eq([{
"condition" => {
"ethnic_group" => 17,
},
"value" => "Prefers not to say",
}])
end
end

Loading…
Cancel
Save