5 changed files with 43 additions and 2 deletions
@ -0,0 +1,37 @@ |
|||||||
|
require "rails_helper" |
||||||
|
|
||||||
|
RSpec.describe Form::Sales::Pages::Buyer1IncomeMaxValueCheck, type: :model do |
||||||
|
subject(:page) { described_class.new(page_id, page_definition, subsection) } |
||||||
|
|
||||||
|
let(:page_id) { "prefix_buyer_1_income_max_value_check" } |
||||||
|
let(:page_definition) { nil } |
||||||
|
let(:subsection) { instance_double(Form::Subsection) } |
||||||
|
|
||||||
|
it "has correct subsection" do |
||||||
|
expect(page.subsection).to eq(subsection) |
||||||
|
end |
||||||
|
|
||||||
|
it "has correct questions" do |
||||||
|
expect(page.questions.map(&:id)).to eq(%w[income1_value_check]) |
||||||
|
end |
||||||
|
|
||||||
|
it "has the correct id" do |
||||||
|
expect(page.id).to eq("prefix_buyer_1_income_max_value_check") |
||||||
|
end |
||||||
|
|
||||||
|
it "has the correct header" do |
||||||
|
expect(page.header).to be_nil |
||||||
|
end |
||||||
|
|
||||||
|
it "has correct depends_on" do |
||||||
|
expect(page.depends_on).to eq([ |
||||||
|
{ |
||||||
|
"income1_over_soft_max?" => true, |
||||||
|
}, |
||||||
|
]) |
||||||
|
end |
||||||
|
|
||||||
|
it "is interruption screen page" do |
||||||
|
expect(page.interruption_screen?).to eq(true) |
||||||
|
end |
||||||
|
end |
||||||
@ -1,6 +1,6 @@ |
|||||||
require "rails_helper" |
require "rails_helper" |
||||||
|
|
||||||
RSpec.describe Form::Sales::Questions::Buyer1IncomeMinValueCheck, type: :model do |
RSpec.describe Form::Sales::Questions::Buyer1IncomeValueCheck, 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