Browse Source

Add hidden_in_check_answers

pull/909/head^2
Kat 4 years ago
parent
commit
0a64b474a9
  1. 7
      app/models/form/sales/questions/nationality1.rb
  2. 10
      spec/models/form/sales/questions/nationality1_spec.rb

7
app/models/form/sales/questions/nationality1.rb

@ -11,6 +11,13 @@ class Form::Sales::Questions::Nationality1 < ::Form::Question
@conditional_for = { @conditional_for = {
"othernational" => [12], "othernational" => [12],
} }
@hidden_in_check_answers = {
"depends_on" => [
{
"national" => 12,
},
],
}
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

10
spec/models/form/sales/questions/nationality1_spec.rb

@ -50,4 +50,14 @@ RSpec.describe Form::Sales::Questions::Nationality1, type: :model do
"othernational" => [12], "othernational" => [12],
}) })
end end
it "has correct hidden in check answers" do
expect(question.hidden_in_check_answers).to eq({
"depends_on" => [
{
"national" => 12,
},
],
})
end
end end

Loading…
Cancel
Save