Browse Source

refactor: linting

pull/1225/head
natdeanlewissoftwire 2 years ago
parent
commit
e65d8070d3
  1. 4
      spec/lib/tasks/purchase_price_range_import_spec.rb
  2. 8
      spec/models/validations/sales/soft_validations_spec.rb

4
spec/lib/tasks/purchase_price_range_import_spec.rb

@ -34,12 +34,12 @@ RSpec.describe "data_import" do
end
context "when a record already exists with a matching index of la, bedrooms and start year" do
let!(:purchase_price_range) { LaPurchasePriceRange.create(la: "E07000223", bedrooms: 2, soft_min: 177000, soft_max: 384000, start_year: 2022) }
let!(:purchase_price_range) { LaPurchasePriceRange.create(la: "E07000223", bedrooms: 2, soft_min: 177_000, soft_max: 384_000, start_year: 2022) }
it "updates rent ranges if the record is matched on la, bedrooms and start year" do
task.invoke(start_year, purchase_price_ranges_file_path)
purchase_price_range.reload
expect(purchase_price_range.soft_max).to eq(384000)
expect(purchase_price_range.soft_max).to eq(384_000)
end
end
end

8
spec/models/validations/sales/soft_validations_spec.rb

@ -335,11 +335,12 @@ RSpec.describe Validations::Sales::SoftValidations do
LaPurchasePriceRange.create!(
la: "E07000223",
bedrooms: 2,
soft_min: 177000,
soft_max: 384000,
soft_min: 177_000,
soft_max: 384_000,
start_year: 2022,
)
)
end
it "when value not set" do
record.value = nil
@ -361,7 +362,6 @@ RSpec.describe Validations::Sales::SoftValidations do
it "when saledate not set" do
record.saledate = nil
expect(record).not_to be_purchase_price_out_of_soft_range
end

Loading…
Cancel
Save