Browse Source

Add min and max for age 1 validation

pull/1191/head
Kat 3 years ago
parent
commit
f3029e02fc
  1. 2
      app/models/form/sales/questions/age1.rb
  2. 8
      spec/models/form/sales/questions/age1_spec.rb

2
app/models/form/sales/questions/age1.rb

@ -17,5 +17,7 @@ class Form::Sales::Questions::Age1 < ::Form::Question
},
]
@check_answers_card_number = 1
@min = 16
@max = 110
end
end

8
spec/models/form/sales/questions/age1_spec.rb

@ -55,4 +55,12 @@ RSpec.describe Form::Sales::Questions::Age1, 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 min" do
expect(question.min).to eq(16)
end
it "has the correct max" do
expect(question.max).to eq(110)
end
end

Loading…
Cancel
Save