Browse Source
* Add min and max for age 1 validation * Add retirement value check column to the sales table * Add retirement value check question and page * Add retirement value check pages to household characteristics * Reuse soft validations for retirement in sales * Update person_indexes * Add old_persons_shared_ownership validation * Display the retirement value check in correct places depending on the joinpur value * Update page IDs * It's always joint purchase if age 2 is displayed * lint * lintpull/1215/head
kosiakkatrina
2 years ago
committed by
GitHub
18 changed files with 996 additions and 26 deletions
@ -0,0 +1,43 @@
|
||||
class Form::Sales::Pages::RetirementValueCheck < Form::Sales::Pages::Person |
||||
def initialize(id, hsh, subsection, person_index:) |
||||
super |
||||
@depends_on = [ |
||||
{ |
||||
"person_#{person_index}_retired_under_soft_min_age?" => true, |
||||
"jointpur" => joint_purchase? ? 1 : 2, |
||||
}, |
||||
] |
||||
@person_index = person_index |
||||
@title_text = { |
||||
"translation" => "soft_validations.retirement.min.title", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "retirement_age_for_person_#{person_index}", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
} |
||||
@informative_text = { |
||||
"translation" => "soft_validations.retirement.min.hint_text", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "plural_gender_for_person_#{person_index}", |
||||
"label" => false, |
||||
"i18n_template" => "gender", |
||||
}, |
||||
{ |
||||
"key" => "retirement_age_for_person_#{person_index}", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
} |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [ |
||||
Form::Sales::Questions::RetirementValueCheck.new(nil, nil, self, person_index: @person_index), |
||||
] |
||||
end |
||||
end |
@ -0,0 +1,24 @@
|
||||
class Form::Sales::Questions::RetirementValueCheck < ::Form::Question |
||||
def initialize(id, hsh, page, person_index:) |
||||
super(id, hsh, page) |
||||
@id = "retirement_value_check" |
||||
@check_answer_label = "Retirement confirmation" |
||||
@type = "interruption_screen" |
||||
@answer_options = { |
||||
"0" => { "value" => "Yes" }, |
||||
"1" => { "value" => "No" }, |
||||
} |
||||
@hidden_in_check_answers = { |
||||
"depends_on" => [ |
||||
{ |
||||
"retirement_value_check" => 0, |
||||
}, |
||||
{ |
||||
"retirement_value_check" => 1, |
||||
}, |
||||
], |
||||
} |
||||
@check_answers_card_number = person_index |
||||
@header = "Are you sure this person is retired?" |
||||
end |
||||
end |
@ -0,0 +1,7 @@
|
||||
class AddRetirementValueCheckToSales < ActiveRecord::Migration[7.0] |
||||
def change |
||||
change_table :sales_logs, bulk: true do |t| |
||||
t.column :retirement_value_check, :integer |
||||
end |
||||
end |
||||
end |
@ -0,0 +1,603 @@
|
||||
require "rails_helper" |
||||
|
||||
RSpec.describe Form::Sales::Pages::RetirementValueCheck, type: :model do |
||||
subject(:page) { described_class.new(page_id, page_definition, subsection, person_index:) } |
||||
|
||||
let(:page_definition) { nil } |
||||
let(:subsection) { instance_double(Form::Subsection) } |
||||
let(:person_index) { 1 } |
||||
|
||||
let(:page_id) { "person_1_retirement_value_check" } |
||||
|
||||
it "has correct subsection" do |
||||
expect(page.subsection).to eq(subsection) |
||||
end |
||||
|
||||
it "has the correct header" do |
||||
expect(page.header).to be_nil |
||||
end |
||||
|
||||
it "has the correct description" do |
||||
expect(page.description).to be_nil |
||||
end |
||||
|
||||
context "with joint purchase" do |
||||
context "with person 1" do |
||||
let(:person_index) { 1 } |
||||
let(:page_id) { "person_1_retirement_value_check_joint_purchase" } |
||||
|
||||
it "has correct questions" do |
||||
expect(page.questions.map(&:id)).to eq(%w[retirement_value_check]) |
||||
end |
||||
|
||||
it "has the correct id" do |
||||
expect(page.id).to eq("person_1_retirement_value_check_joint_purchase") |
||||
end |
||||
|
||||
it "has correct depends_on" do |
||||
expect(page.depends_on).to eq([{ "person_1_retired_under_soft_min_age?" => true, "jointpur" => 1 }]) |
||||
end |
||||
|
||||
it "has correct title_text" do |
||||
expect(page.title_text).to eq({ |
||||
"translation" => "soft_validations.retirement.min.title", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "retirement_age_for_person_1", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
}) |
||||
end |
||||
|
||||
it "has correct informative_text" do |
||||
expect(page.informative_text).to eq({ |
||||
"translation" => "soft_validations.retirement.min.hint_text", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "plural_gender_for_person_1", |
||||
"label" => false, |
||||
"i18n_template" => "gender", |
||||
}, |
||||
{ |
||||
"key" => "retirement_age_for_person_1", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
}) |
||||
end |
||||
end |
||||
|
||||
context "with person 2" do |
||||
let(:person_index) { 2 } |
||||
let(:page_id) { "person_2_retirement_value_check_joint_purchase" } |
||||
|
||||
it "has correct questions" do |
||||
expect(page.questions.map(&:id)).to eq(%w[retirement_value_check]) |
||||
end |
||||
|
||||
it "has the correct id" do |
||||
expect(page.id).to eq("person_2_retirement_value_check_joint_purchase") |
||||
end |
||||
|
||||
it "has correct depends_on" do |
||||
expect(page.depends_on).to eq([{ "person_2_retired_under_soft_min_age?" => true, "jointpur" => 1 }]) |
||||
end |
||||
|
||||
it "has correct title_text" do |
||||
expect(page.title_text).to eq({ |
||||
"translation" => "soft_validations.retirement.min.title", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "retirement_age_for_person_2", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
}) |
||||
end |
||||
|
||||
it "has correct informative_text" do |
||||
expect(page.informative_text).to eq({ |
||||
"translation" => "soft_validations.retirement.min.hint_text", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "plural_gender_for_person_2", |
||||
"label" => false, |
||||
"i18n_template" => "gender", |
||||
}, |
||||
{ |
||||
"key" => "retirement_age_for_person_2", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
}) |
||||
end |
||||
end |
||||
|
||||
context "with person 3" do |
||||
let(:person_index) { 3 } |
||||
let(:page_id) { "person_3_retirement_value_check_joint_purchase" } |
||||
|
||||
it "has correct questions" do |
||||
expect(page.questions.map(&:id)).to eq(%w[retirement_value_check]) |
||||
end |
||||
|
||||
it "has the correct id" do |
||||
expect(page.id).to eq("person_3_retirement_value_check_joint_purchase") |
||||
end |
||||
|
||||
it "has correct depends_on" do |
||||
expect(page.depends_on).to eq([{ "person_3_retired_under_soft_min_age?" => true, "jointpur" => 1 }]) |
||||
end |
||||
|
||||
it "has correct title_text" do |
||||
expect(page.title_text).to eq({ |
||||
"translation" => "soft_validations.retirement.min.title", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "retirement_age_for_person_3", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
}) |
||||
end |
||||
|
||||
it "has correct informative_text" do |
||||
expect(page.informative_text).to eq({ |
||||
"translation" => "soft_validations.retirement.min.hint_text", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "plural_gender_for_person_3", |
||||
"label" => false, |
||||
"i18n_template" => "gender", |
||||
}, |
||||
{ |
||||
"key" => "retirement_age_for_person_3", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
}) |
||||
end |
||||
end |
||||
|
||||
context "with person 4" do |
||||
let(:person_index) { 4 } |
||||
let(:page_id) { "person_4_retirement_value_check_joint_purchase" } |
||||
|
||||
it "has correct questions" do |
||||
expect(page.questions.map(&:id)).to eq(%w[retirement_value_check]) |
||||
end |
||||
|
||||
it "has the correct id" do |
||||
expect(page.id).to eq("person_4_retirement_value_check_joint_purchase") |
||||
end |
||||
|
||||
it "has correct depends_on" do |
||||
expect(page.depends_on).to eq([{ "person_4_retired_under_soft_min_age?" => true, "jointpur" => 1 }]) |
||||
end |
||||
|
||||
it "has correct title_text" do |
||||
expect(page.title_text).to eq({ |
||||
"translation" => "soft_validations.retirement.min.title", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "retirement_age_for_person_4", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
}) |
||||
end |
||||
|
||||
it "has correct informative_text" do |
||||
expect(page.informative_text).to eq({ |
||||
"translation" => "soft_validations.retirement.min.hint_text", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "plural_gender_for_person_4", |
||||
"label" => false, |
||||
"i18n_template" => "gender", |
||||
}, |
||||
{ |
||||
"key" => "retirement_age_for_person_4", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
}) |
||||
end |
||||
end |
||||
|
||||
context "with person 5" do |
||||
let(:person_index) { 5 } |
||||
let(:page_id) { "person_5_retirement_value_check_joint_purchase" } |
||||
|
||||
it "has correct questions" do |
||||
expect(page.questions.map(&:id)).to eq(%w[retirement_value_check]) |
||||
end |
||||
|
||||
it "has the correct id" do |
||||
expect(page.id).to eq("person_5_retirement_value_check_joint_purchase") |
||||
end |
||||
|
||||
it "has correct depends_on" do |
||||
expect(page.depends_on).to eq([{ "person_5_retired_under_soft_min_age?" => true, "jointpur" => 1 }]) |
||||
end |
||||
|
||||
it "has correct title_text" do |
||||
expect(page.title_text).to eq({ |
||||
"translation" => "soft_validations.retirement.min.title", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "retirement_age_for_person_5", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
}) |
||||
end |
||||
|
||||
it "has correct informative_text" do |
||||
expect(page.informative_text).to eq({ |
||||
"translation" => "soft_validations.retirement.min.hint_text", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "plural_gender_for_person_5", |
||||
"label" => false, |
||||
"i18n_template" => "gender", |
||||
}, |
||||
{ |
||||
"key" => "retirement_age_for_person_5", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
}) |
||||
end |
||||
end |
||||
|
||||
context "with person 6" do |
||||
let(:person_index) { 6 } |
||||
let(:page_id) { "person_6_retirement_value_check_joint_purchase" } |
||||
|
||||
it "has correct questions" do |
||||
expect(page.questions.map(&:id)).to eq(%w[retirement_value_check]) |
||||
end |
||||
|
||||
it "has the correct id" do |
||||
expect(page.id).to eq("person_6_retirement_value_check_joint_purchase") |
||||
end |
||||
|
||||
it "has correct depends_on" do |
||||
expect(page.depends_on).to eq([{ "person_6_retired_under_soft_min_age?" => true, "jointpur" => 1 }]) |
||||
end |
||||
|
||||
it "has correct title_text" do |
||||
expect(page.title_text).to eq({ |
||||
"translation" => "soft_validations.retirement.min.title", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "retirement_age_for_person_6", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
}) |
||||
end |
||||
|
||||
it "has correct informative_text" do |
||||
expect(page.informative_text).to eq({ |
||||
"translation" => "soft_validations.retirement.min.hint_text", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "plural_gender_for_person_6", |
||||
"label" => false, |
||||
"i18n_template" => "gender", |
||||
}, |
||||
{ |
||||
"key" => "retirement_age_for_person_6", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
}) |
||||
end |
||||
end |
||||
end |
||||
|
||||
context "without joint purchase" do |
||||
context "with person 1" do |
||||
let(:person_index) { 1 } |
||||
let(:page_id) { "person_1_retirement_value_check" } |
||||
|
||||
it "has correct questions" do |
||||
expect(page.questions.map(&:id)).to eq(%w[retirement_value_check]) |
||||
end |
||||
|
||||
it "has the correct id" do |
||||
expect(page.id).to eq("person_1_retirement_value_check") |
||||
end |
||||
|
||||
it "has correct depends_on" do |
||||
expect(page.depends_on).to eq([{ "person_1_retired_under_soft_min_age?" => true, "jointpur" => 2 }]) |
||||
end |
||||
|
||||
it "has correct title_text" do |
||||
expect(page.title_text).to eq({ |
||||
"translation" => "soft_validations.retirement.min.title", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "retirement_age_for_person_1", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
}) |
||||
end |
||||
|
||||
it "has correct informative_text" do |
||||
expect(page.informative_text).to eq({ |
||||
"translation" => "soft_validations.retirement.min.hint_text", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "plural_gender_for_person_1", |
||||
"label" => false, |
||||
"i18n_template" => "gender", |
||||
}, |
||||
{ |
||||
"key" => "retirement_age_for_person_1", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
}) |
||||
end |
||||
end |
||||
|
||||
context "with person 2" do |
||||
let(:person_index) { 2 } |
||||
let(:page_id) { "person_2_retirement_value_check" } |
||||
|
||||
it "has correct questions" do |
||||
expect(page.questions.map(&:id)).to eq(%w[retirement_value_check]) |
||||
end |
||||
|
||||
it "has the correct id" do |
||||
expect(page.id).to eq("person_2_retirement_value_check") |
||||
end |
||||
|
||||
it "has correct depends_on" do |
||||
expect(page.depends_on).to eq([{ "person_2_retired_under_soft_min_age?" => true, "jointpur" => 2 }]) |
||||
end |
||||
|
||||
it "has correct title_text" do |
||||
expect(page.title_text).to eq({ |
||||
"translation" => "soft_validations.retirement.min.title", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "retirement_age_for_person_2", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
}) |
||||
end |
||||
|
||||
it "has correct informative_text" do |
||||
expect(page.informative_text).to eq({ |
||||
"translation" => "soft_validations.retirement.min.hint_text", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "plural_gender_for_person_2", |
||||
"label" => false, |
||||
"i18n_template" => "gender", |
||||
}, |
||||
{ |
||||
"key" => "retirement_age_for_person_2", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
}) |
||||
end |
||||
end |
||||
|
||||
context "with person 3" do |
||||
let(:person_index) { 2 } |
||||
let(:page_id) { "person_3_retirement_value_check" } |
||||
|
||||
it "has correct questions" do |
||||
expect(page.questions.map(&:id)).to eq(%w[retirement_value_check]) |
||||
end |
||||
|
||||
it "has the correct id" do |
||||
expect(page.id).to eq("person_3_retirement_value_check") |
||||
end |
||||
|
||||
it "has correct depends_on" do |
||||
expect(page.depends_on).to eq([{ "person_2_retired_under_soft_min_age?" => true, "jointpur" => 2 }]) |
||||
end |
||||
|
||||
it "has correct title_text" do |
||||
expect(page.title_text).to eq({ |
||||
"translation" => "soft_validations.retirement.min.title", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "retirement_age_for_person_2", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
}) |
||||
end |
||||
|
||||
it "has correct informative_text" do |
||||
expect(page.informative_text).to eq({ |
||||
"translation" => "soft_validations.retirement.min.hint_text", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "plural_gender_for_person_2", |
||||
"label" => false, |
||||
"i18n_template" => "gender", |
||||
}, |
||||
{ |
||||
"key" => "retirement_age_for_person_2", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
}) |
||||
end |
||||
end |
||||
|
||||
context "with person 4" do |
||||
let(:person_index) { 3 } |
||||
let(:page_id) { "person_4_retirement_value_check" } |
||||
|
||||
it "has correct questions" do |
||||
expect(page.questions.map(&:id)).to eq(%w[retirement_value_check]) |
||||
end |
||||
|
||||
it "has the correct id" do |
||||
expect(page.id).to eq("person_4_retirement_value_check") |
||||
end |
||||
|
||||
it "has correct depends_on" do |
||||
expect(page.depends_on).to eq([{ "person_3_retired_under_soft_min_age?" => true, "jointpur" => 2 }]) |
||||
end |
||||
|
||||
it "has correct title_text" do |
||||
expect(page.title_text).to eq({ |
||||
"translation" => "soft_validations.retirement.min.title", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "retirement_age_for_person_3", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
}) |
||||
end |
||||
|
||||
it "has correct informative_text" do |
||||
expect(page.informative_text).to eq({ |
||||
"translation" => "soft_validations.retirement.min.hint_text", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "plural_gender_for_person_3", |
||||
"label" => false, |
||||
"i18n_template" => "gender", |
||||
}, |
||||
{ |
||||
"key" => "retirement_age_for_person_3", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
}) |
||||
end |
||||
end |
||||
|
||||
context "with person 5" do |
||||
let(:person_index) { 4 } |
||||
let(:page_id) { "person_5_retirement_value_check" } |
||||
|
||||
it "has correct questions" do |
||||
expect(page.questions.map(&:id)).to eq(%w[retirement_value_check]) |
||||
end |
||||
|
||||
it "has the correct id" do |
||||
expect(page.id).to eq("person_5_retirement_value_check") |
||||
end |
||||
|
||||
it "has correct depends_on" do |
||||
expect(page.depends_on).to eq([{ "person_4_retired_under_soft_min_age?" => true, "jointpur" => 2 }]) |
||||
end |
||||
|
||||
it "has correct title_text" do |
||||
expect(page.title_text).to eq({ |
||||
"translation" => "soft_validations.retirement.min.title", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "retirement_age_for_person_4", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
}) |
||||
end |
||||
|
||||
it "has correct informative_text" do |
||||
expect(page.informative_text).to eq({ |
||||
"translation" => "soft_validations.retirement.min.hint_text", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "plural_gender_for_person_4", |
||||
"label" => false, |
||||
"i18n_template" => "gender", |
||||
}, |
||||
{ |
||||
"key" => "retirement_age_for_person_4", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
}) |
||||
end |
||||
end |
||||
|
||||
context "with person 6" do |
||||
let(:person_index) { 5 } |
||||
let(:page_id) { "person_6_retirement_value_check" } |
||||
|
||||
it "has correct questions" do |
||||
expect(page.questions.map(&:id)).to eq(%w[retirement_value_check]) |
||||
end |
||||
|
||||
it "has the correct id" do |
||||
expect(page.id).to eq("person_6_retirement_value_check") |
||||
end |
||||
|
||||
it "has correct depends_on" do |
||||
expect(page.depends_on).to eq([{ "person_5_retired_under_soft_min_age?" => true, "jointpur" => 2 }]) |
||||
end |
||||
|
||||
it "has correct title_text" do |
||||
expect(page.title_text).to eq({ |
||||
"translation" => "soft_validations.retirement.min.title", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "retirement_age_for_person_5", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
}) |
||||
end |
||||
|
||||
it "has correct informative_text" do |
||||
expect(page.informative_text).to eq({ |
||||
"translation" => "soft_validations.retirement.min.hint_text", |
||||
"arguments" => [ |
||||
{ |
||||
"key" => "plural_gender_for_person_5", |
||||
"label" => false, |
||||
"i18n_template" => "gender", |
||||
}, |
||||
{ |
||||
"key" => "retirement_age_for_person_5", |
||||
"label" => false, |
||||
"i18n_template" => "age", |
||||
}, |
||||
], |
||||
}) |
||||
end |
||||
end |
||||
end |
||||
end |
@ -0,0 +1,61 @@
|
||||
require "rails_helper" |
||||
|
||||
RSpec.describe Form::Sales::Questions::RetirementValueCheck, type: :model do |
||||
subject(:question) { described_class.new(question_id, question_definition, page, person_index: 1) } |
||||
|
||||
let(:question_id) { nil } |
||||
let(:question_definition) { nil } |
||||
let(:page) { instance_double(Form::Page) } |
||||
|
||||
it "has correct page" do |
||||
expect(question.page).to eq(page) |
||||
end |
||||
|
||||
it "has the correct id" do |
||||
expect(question.id).to eq("retirement_value_check") |
||||
end |
||||
|
||||
it "has the correct header" do |
||||
expect(question.header).to eq("Are you sure this person is retired?") |
||||
end |
||||
|
||||
it "has the correct check_answer_label" do |
||||
expect(question.check_answer_label).to eq("Retirement confirmation") |
||||
end |
||||
|
||||
it "has the correct type" do |
||||
expect(question.type).to eq("interruption_screen") |
||||
end |
||||
|
||||
it "is not marked as derived" do |
||||
expect(question.derived?).to be false |
||||
end |
||||
|
||||
it "has the correct hint" do |
||||
expect(question.hint_text).to be_nil |
||||
end |
||||
|
||||
it "has a correct check_answers_card_number" do |
||||
expect(question.check_answers_card_number).to eq(1) |
||||
end |
||||
|
||||
it "has the correct answer_options" do |
||||
expect(question.answer_options).to eq({ |
||||
"0" => { "value" => "Yes" }, |
||||
"1" => { "value" => "No" }, |
||||
}) |
||||
end |
||||
|
||||
it "has the correct hidden_in_check_answers" do |
||||
expect(question.hidden_in_check_answers).to eq({ |
||||
"depends_on" => [ |
||||
{ |
||||
"retirement_value_check" => 0, |
||||
}, |
||||
{ |
||||
"retirement_value_check" => 1, |
||||
}, |
||||
], |
||||
}) |
||||
end |
||||
end |
Loading…
Reference in new issue