11 changed files with 48 additions and 11 deletions
@ -0,0 +1,27 @@ |
|||||||
|
class Form::Sales::Pages::Buyer1IncomeMaxValueCheck < ::Form::Page |
||||||
|
def initialize(id, hsh, subsection) |
||||||
|
super |
||||||
|
@depends_on = [ |
||||||
|
{ |
||||||
|
"income1_over_soft_max?" => true, |
||||||
|
}, |
||||||
|
] |
||||||
|
@title_text = { |
||||||
|
"translation" => "soft_validations.income.over_soft_max_for_la", |
||||||
|
"arguments" => [ |
||||||
|
{ |
||||||
|
"key" => "field_formatted_as_currency", |
||||||
|
"arguments_for_key" => "income1", |
||||||
|
"i18n_template" => "income", |
||||||
|
} |
||||||
|
], |
||||||
|
} |
||||||
|
@informative_text = {} |
||||||
|
end |
||||||
|
|
||||||
|
def questions |
||||||
|
@questions ||= [ |
||||||
|
Form::Sales::Questions::Buyer1IncomeValueCheck.new(nil, nil, self), |
||||||
|
] |
||||||
|
end |
||||||
|
end |
||||||
@ -1,4 +1,4 @@ |
|||||||
class Form::Sales::Pages::Buyer1IncomeValueCheck < ::Form::Page |
class Form::Sales::Pages::Buyer1IncomeMinValueCheck < ::Form::Page |
||||||
def initialize(id, hsh, subsection) |
def initialize(id, hsh, subsection) |
||||||
super |
super |
||||||
@depends_on = [ |
@depends_on = [ |
||||||
@ -1,6 +1,6 @@ |
|||||||
require "rails_helper" |
require "rails_helper" |
||||||
|
|
||||||
RSpec.describe Form::Sales::Questions::Buyer1IncomeValueCheck, type: :model do |
RSpec.describe Form::Sales::Questions::Buyer1IncomeMinValueCheck, type: :model do |
||||||
subject(:question) { described_class.new(question_id, question_definition, page) } |
subject(:question) { described_class.new(question_id, question_definition, page) } |
||||||
|
|
||||||
let(:question_id) { nil } |
let(:question_id) { nil } |
||||||
Loading…
Reference in new issue