diff --git a/spec/models/bulk_upload_spec.rb b/spec/models/bulk_upload_spec.rb index d8359df71..95f0c4152 100644 --- a/spec/models/bulk_upload_spec.rb +++ b/spec/models/bulk_upload_spec.rb @@ -38,7 +38,7 @@ RSpec.describe BulkUpload, type: :model do let(:log) { build(:sales_log, saledate:, bulk_upload:) } it "has the correct number of value checks to be set as confirmed" do - expect(bulk_upload.fields_to_confirm(log)).to match_array %w[value_value_check monthly_charges_value_check percentage_discount_value_check income1_value_check income2_value_check combined_income_value_check retirement_value_check old_persons_shared_ownership_value_check buyer_livein_value_check wheel_value_check mortgage_value_check savings_value_check deposit_value_check staircase_bought_value_check stairowned_value_check hodate_check shared_ownership_deposit_value_check extrabor_value_check grant_value_check discounted_sale_value_check deposit_and_mortgage_value_check multiple_partners_value_check partner_under_16_value_check] + expect(bulk_upload.fields_to_confirm(log)).to match_array %w[value_value_check monthly_charges_value_check percentage_discount_value_check income1_value_check income2_value_check combined_income_value_check retirement_value_check old_persons_shared_ownership_value_check buyer_livein_value_check wheel_value_check mortgage_value_check savings_value_check deposit_value_check staircase_bought_value_check stairowned_value_check hodate_check grant_value_check deposit_and_mortgage_value_check multiple_partners_value_check partner_under_16_value_check] end end end @@ -59,7 +59,7 @@ RSpec.describe BulkUpload, type: :model do let(:log) { build(:sales_log, saledate:, bulk_upload:) } it "has the correct number of value checks to be set as confirmed" do - expect(bulk_upload.fields_to_confirm(log)).to match_array %w[value_value_check monthly_charges_value_check percentage_discount_value_check income1_value_check income2_value_check combined_income_value_check retirement_value_check old_persons_shared_ownership_value_check buyer_livein_value_check wheel_value_check mortgage_value_check savings_value_check deposit_value_check staircase_bought_value_check stairowned_value_check hodate_check shared_ownership_deposit_value_check extrabor_value_check grant_value_check discounted_sale_value_check deposit_and_mortgage_value_check multiple_partners_value_check partner_under_16_value_check] + expect(bulk_upload.fields_to_confirm(log)).to match_array %w[value_value_check monthly_charges_value_check percentage_discount_value_check income1_value_check income2_value_check combined_income_value_check retirement_value_check old_persons_shared_ownership_value_check buyer_livein_value_check wheel_value_check mortgage_value_check savings_value_check deposit_value_check staircase_bought_value_check stairowned_value_check hodate_check grant_value_check deposit_and_mortgage_value_check multiple_partners_value_check partner_under_16_value_check] end end end diff --git a/spec/models/lettings_log_spec.rb b/spec/models/lettings_log_spec.rb index f69317832..8d8da3894 100644 --- a/spec/models/lettings_log_spec.rb +++ b/spec/models/lettings_log_spec.rb @@ -90,22 +90,10 @@ RSpec.describe LettingsLog do expect(validator).to receive(:validate_irproduct_other) end - it "validates partner count" do - expect(validator).to receive(:validate_partner_count) - end - it "validates person age matches economic status" do expect(validator).to receive(:validate_person_age_matches_economic_status) end - it "validates person age matches relationship" do - expect(validator).to receive(:validate_person_age_matches_relationship) - end - - it "validates person age and relationship matches economic status" do - expect(validator).to receive(:validate_person_age_and_relationship_matches_economic_status) - end - it "validates bedroom number" do expect(validator).to receive(:validate_shared_housing_rooms) end diff --git a/spec/models/sales_log_spec.rb b/spec/models/sales_log_spec.rb index 50aa23a72..29866c3be 100644 --- a/spec/models/sales_log_spec.rb +++ b/spec/models/sales_log_spec.rb @@ -45,26 +45,10 @@ RSpec.describe SalesLog, type: :model do sales_log.update(age1: 25) end - it "validates partner count" do - expect(validator).to receive(:validate_partner_count) - end - it "validates person age matches economic status" do expect(validator).to receive(:validate_person_age_matches_economic_status) end - it "validates person age matches relationship" do - expect(validator).to receive(:validate_person_age_matches_relationship) - end - - it "validates person age and relationship matches economic status" do - expect(validator).to receive(:validate_person_age_and_relationship_matches_economic_status) - end - - it "validates child is over 12 years younger than lead tenant" do - expect(validator).to receive(:validate_child_12_years_younger) - end - it "calls the form to clear any invalid answers" do expect(sales_log.form).to receive(:reset_not_routed_questions_and_invalid_answers) end