Browse Source

test: update

CLDC-1790-sales-validation-content-updates
natdeanlewissoftwire 2 years ago
parent
commit
21d993a0e4
  1. 2
      app/controllers/lettings_logs_controller.rb
  2. 5
      db/schema.rb
  3. 2
      spec/models/form/sales/questions/buyer1_income_value_check_spec.rb
  4. 2
      spec/models/form/sales/questions/household_wheelchair_check_spec.rb
  5. 4
      spec/models/form/sales/questions/property_number_of_bedrooms_spec.rb

2
app/controllers/lettings_logs_controller.rb

@ -119,7 +119,7 @@ private
end end
def extract_bulk_upload_from_session_filters def extract_bulk_upload_from_session_filters
id = ((@session_filters["bulk_upload_id"] || []).reject(&:blank?))[0] id = (@session_filters["bulk_upload_id"] || []).reject(&:blank?)[0]
@bulk_upload = current_user.bulk_uploads.find_by(id:) @bulk_upload = current_user.bulk_uploads.find_by(id:)
end end

5
db/schema.rb

@ -486,9 +486,9 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_23_160741) do
t.integer "hoyear" t.integer "hoyear"
t.integer "fromprop" t.integer "fromprop"
t.integer "socprevten" t.integer "socprevten"
t.integer "mortlen"
t.integer "mortgagelender" t.integer "mortgagelender"
t.string "mortgagelenderother" t.string "mortgagelenderother"
t.integer "mortlen"
t.integer "extrabor" t.integer "extrabor"
t.integer "hhmemb" t.integer "hhmemb"
t.integer "totadult" t.integer "totadult"
@ -501,10 +501,9 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_23_160741) do
t.boolean "is_la_inferred" t.boolean "is_la_inferred"
t.bigint "bulk_upload_id" t.bigint "bulk_upload_id"
t.integer "retirement_value_check" t.integer "retirement_value_check"
t.integer "deposit_and_mortgage_value_check"
t.integer "grant_value_check"
t.integer "hodate_check" t.integer "hodate_check"
t.integer "extrabor_value_check" t.integer "extrabor_value_check"
t.integer "grant_value_check"
t.index ["bulk_upload_id"], name: "index_sales_logs_on_bulk_upload_id" t.index ["bulk_upload_id"], name: "index_sales_logs_on_bulk_upload_id"
t.index ["created_by_id"], name: "index_sales_logs_on_created_by_id" t.index ["created_by_id"], name: "index_sales_logs_on_created_by_id"
t.index ["owning_organisation_id"], name: "index_sales_logs_on_owning_organisation_id" t.index ["owning_organisation_id"], name: "index_sales_logs_on_owning_organisation_id"

2
spec/models/form/sales/questions/buyer1_income_value_check_spec.rb

@ -16,7 +16,7 @@ RSpec.describe Form::Sales::Questions::Buyer1IncomeValueCheck, type: :model do
end end
it "has the correct header" do it "has the correct header" do
expect(question.header).to eq("Are you sure this income is correct?") expect(question.header).to eq("Are you sure this is correct?")
end end
it "has the correct check_answer_label" do it "has the correct check_answer_label" do

2
spec/models/form/sales/questions/household_wheelchair_check_spec.rb

@ -16,7 +16,7 @@ RSpec.describe Form::Sales::Questions::HouseholdWheelchairCheck, type: :model do
end end
it "has the correct header" do it "has the correct header" do
expect(question.header).to eq("Are you sure? You said previously that somebody in household uses a wheelchair") expect(question.header).to eq("Is this right? Earlier, you said someone in the household uses a wheelchair")
end end
it "has the correct check_answer_label" do it "has the correct check_answer_label" do

4
spec/models/form/sales/questions/property_number_of_bedrooms_spec.rb

@ -36,10 +36,10 @@ RSpec.describe Form::Sales::Questions::PropertyNumberOfBedrooms, type: :model do
end end
it "has the correct min" do it "has the correct min" do
expect(question.min).to eq(1) expect(question.min).to eq(nil)
end end
it "has the correct max" do it "has the correct max" do
expect(question.max).to eq(9) expect(question.max).to eq(nil)
end end
end end

Loading…
Cancel
Save