Browse Source

CLDC-1457 Update checkbox validation message (#1207)

pull/1213/head
Jack 2 years ago committed by GitHub
parent
commit
45b098ad4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      app/models/form/sales/questions/buyers_organisations.rb
  2. 4
      spec/models/form/sales/questions/buyers_organisations_spec.rb

4
app/models/form/sales/questions/buyers_organisations.rb

@ -15,4 +15,8 @@ class Form::Sales::Questions::BuyersOrganisations < ::Form::Question
"pregla" => { "value" => "Local Authority" }, "pregla" => { "value" => "Local Authority" },
"pregghb" => { "value" => "Help to Buy Agent" }, "pregghb" => { "value" => "Help to Buy Agent" },
}.freeze }.freeze
def unanswered_error_message
"At least one option must be selected of these four"
end
end end

4
spec/models/form/sales/questions/buyers_organisations_spec.rb

@ -35,6 +35,10 @@ RSpec.describe Form::Sales::Questions::BuyersOrganisations, type: :model do
expect(question.hint_text).to eq("Select all that apply") expect(question.hint_text).to eq("Select all that apply")
end end
it "has the correct unanswered_error_message" do
expect(question.unanswered_error_message).to eq("At least one option must be selected of these four")
end
it "has the correct answer_options" do it "has the correct answer_options" do
expect(question.answer_options).to eq( expect(question.answer_options).to eq(
{ {

Loading…
Cancel
Save